Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

locking

Error opening streamreader because file is used by another process

August 31, 2022 by Magenaut

I am developing an application to read an excel spreadsheet, validate the data and then map it to a sql table. The process is to read the file via a streamreader, validate the data, manually make corrections to the excel spreadsheet, validate again — repeat this process until all data validates.

Categories ASP.NET, Q&A Tags asp.net, locking, streamreader Leave a comment

Doing locking in ASP.NET correctly

August 27, 2022 by Magenaut

I have an ASP.NET site with a fairly slow search function, and I want to improve performance by adding the results to the cache for one hour using the query as the cache-key:

Categories ASP.NET, Q&A Tags .net, asp.net, c#, caching, locking Leave a comment

How do I implement “pessimistic locking” in an asp.net application?

August 27, 2022 by Magenaut

I would like some advice from anyone experienced with implementing something like “pessimistic locking” in an asp.net application. This is the behavior I’m looking for:

Categories ASP.NET, Q&A Tags asp.net, locking Leave a comment

How can I lock by cache key?

August 26, 2022 by Magenaut

I am trying to implement a generic thread-safe Cache method, and I wonder how I should implement the lock in it.

Categories ASP.NET, Q&A Tags asp.net, c#, caching, locking, thread-safety Leave a comment

Make sure only a single instance of a program is running

August 20, 2022 by Magenaut

Is there a Pythonic way to have only one instance of a program running?

Categories Python, Q&A Tags locking, mutual-exclusion, process, python Leave a comment

Python sharing a lock between processes

August 19, 2022 by Magenaut

I am attempting to use a partial function so that pool.map() can target a function that has more than one parameter (in this case a Lock() object).

Categories Python, Q&A Tags locking, multiprocessing, python, share Leave a comment

What is the best way to open a file for exclusive access in Python?

August 17, 2022 by Magenaut

What is the most elegant way to solve this:

Categories Python, Q&A Tags file, locking, python Leave a comment

How do you have shared log files under Windows?

August 15, 2022 by Magenaut

I have several different processes and I would like them to all log to the same file. These processes are running on a Windows 7 system. Some are python scripts and others are cmd batch files.

Categories Python, Q&A Tags batch-file, locking, logging, python, windows Leave a comment
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress