on Mon Oct 22 2007, skip-AT-pobox.com wrote: > >> 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.
Well, the cron job does tte with a fresh database, so it's only the various caches that can get into trouble. > 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). Sounds fine to me. I doubt it would be so terribly ugly either. Somebody should have already written a file lock library that encapsulates it, so maybe we can use that. And if it doesn't exist, it should! -- Dave Abrahams Boost Consulting http://www.boost-consulting.com _______________________________________________ spambayes-dev mailing list spambayes-dev@python.org http://mail.python.org/mailman/listinfo/spambayes-dev