[Tutor] I need an 'atomic read/ write action'
Kent Johnson
kent37 at tds.net
Mon Nov 5 02:50:22 CET 2007
Tom wrote:
> So all my ideas for how to record task x as 'done', like using shelve
> or writing a log file etc are not sufficient because, I need an 'atomic
> read/ write action' (I think that's the jargon).
A couple of ideas:
- Michael's file lock
- lockfile is another way to lock files
http://pypi.python.org/pypi/lockfile/0.1
- you could put the tasks in a database that supports transactions
- you could run the scheduler as a single cron task rather than
opportunistically when a user makes a request.
- you could just use cron as your scheduler directly
Kent
More information about the Tutor
mailing list