POV-Ray : Newsgroups : povray.off-topic : Locking references : Re: Locking references Server Time
4 Sep 2024 21:24:11 EDT (-0400)
  Re: Locking references  
From: Stefan Viljoen
Date: 9 Nov 2009 08:46:56
Message: <4af81d4f@news.povray.org>
Invisible wrote:

> Paul Fuller wrote:

>> One issue is that a thread does not always know what locks it needs
>> before the fact.
> 
> Yes, this is the killer. Often it's not possible to know what locks you
> want until you read some data (which you have to lock first). And if you
> release the locks, somebody else could come and change the data...

Isn't that the point? I've never worked with a low-level locking setup, but
I implemented a high-level one in the CMS I'm currently working on. If
somebody accesses a specific item, it is locked with a timeout. If he
doesn't commit changes within 15 minutes (or whatever is set), he "loses"
the lock, and somebody else can edit.

I.e. releasing a lock = it's ok for somebody else to change the data. You
have the lock = everybody else is blocked from changing the data?

-- 
Stefan Viljoen


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.