The protection of resources
Kepes.Krisztian at peto.hu
Fri Jul 25 10:25:30 CEST 2003
In this time I use the Lock() for thread synchronization, and resource
But in the new project I must reorganize this thing.
The program must be run in lin/win, so I cannot use the winapi.
I need to protect resources from concurrent r/w.
Possible that the modules are not threads but are tasks.
In the Delphi and WinAPI I use the Mutex, that is a simple, opsystem
protected thing to signaling.
It is a simple signal (1/0).
I search for this in python, but I see only mutex with "procedure
I cannot see a signal like thing.
I want to only signaling: the resource are taken or not.
I don't want to wait for the non used state (not block !).
So these my questions:
- 1. How to use the py mutex object ? Please send an example to me !
- 2. Have the py an signal object ? (platform !!!)
- 3. Is any solution is a file locking. Have the py a possibility of
file opening ?
More information about the Python-list