On Mon, Sep 19, 2011 at 12:25 AM, Chris Angelico <ros...@gmail.com> wrote:
> On Mon, Sep 19, 2011 at 3:41 PM, Ian Kelly <ian.g.ke...@gmail.com> wrote:
>> And what if the thread gets killed in the middle of the commit?
>>
>
> Database managers solved this problem years ago. It's not done by
> preventing death until you're done - death can come from someone
> brutally pulling out your power cord. There's no "except
> PowerCordRemoved" to protect you from that!

I'm aware of that.  I'm not saying it's impossible, just that the
example you gave is over-simplified, as writing atomic transactional
logic is a rather complex topic.  There may be an existing Python
library to handle this, but I'm not aware of one.

"PowerCordRemoved" is not relevant here, as that would kill the entire
process, which renders the issue of broken shared data within a
continuing process rather moot.

Cheers,
Ian
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to