Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.

benhoyt/namedmutex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

namedmutex.py, a simple ctypes wrapper for Win32 named mutexes

NamedMutex is a class for using Windows (Win32) named mutexes for system-wide locks. For example, we use these to lock system-wide log files that multiple processes can write to.

This has a similar API to threading.Lock, and can be used with Python's with statement.

For example:

with namedmutex.NamedMutex('get_dir_mutex'):
    latest_dir = get_latest_dir()
    os.rename(latest_dir, latest_dir + '-processing')

See the source code for more info!

About

namedmutex.py, a simple ctypes wrapper for Win32 named mutexes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages