Re: Unsafe Pickle Saving
[email protected] Mon, 22 Oct 2007 07:00:17 -0500
| Newsgroups | gmane.mail.spam.spambayes.devel |
|---|---|
| Message-ID | <[email protected]> |
>> Can you explain how the pickle would be read and written
>> simultaneously?
Dave> I assume it's the same app from multiple processes.... And then
Dave> there's my cron job that does training once daily, which could
Dave> happen at the same time as any message arrives.
That would be it. There is no locking of the various databases between
processes. I suppose we could implement something, but the vagaries of
network file systems and cross-platform demands have always made that task
problematic. Maybe we should expand your safe_pickle code into
safe_pickle_read and safe_pickle_write with a corresponding bit of file
locking code they can invoke (which will probably be ugly as sin - but
hidden away in a dark corner - once it's complete).
Skip