|
riesch at nieuw.nl
riesch at nieuw.nl
Wed Aug 15 15:12:36 EST 2001
Hi thanks for the answer,
I've done a bit of checking and I'm sufficiently convinced that only those objects I need are being unpickled.
About your hint with the file-locking. I've dived into the python-docs and the man-pages on system-calls, but I'm not able to figure out how this locking is done. Thus far I've come up with the following solution:
desc = open('file', 'w')
fcntl.flock(desc.fileno(), FCNTL.LOCK_EX)
# operations on the file
fcntl.flock(desc.fileno(), FCNTL.LOCK_UN)
desc.close()
This obtains the lock, but it's not released. So when I next try to open the file and obtain the lock, my app hangs.
How to solve this ?,
Richard
|