[Gambas-user] Changes in LINK
Christopher Brian Jack
brian at ...1334...
Sun Oct 29 00:54:00 CEST 2006
On Sat, 28 Oct 2006, Benoit Minisini wrote:
> You have the LOCK and UNLOCK keyword for locking/unlocking a file opened for
> writing.
>
> Maybe I should rewrite them so that they work on a path and not on a file.
> This will be easier to use: you choose a path file that will work as a lock,
> and you use LOCK and UNLOCK on it.
There are times where locking is desirable for readers as well as writers
such as when access to one part of a file is an index to where other data
should be written. If a race condition develops between two concurrent
accessors on the file and one changes the index between the time the first
app does it's read then reopens for write+lock there will definately be
file inconsistencies and a whole new insect kingdom of bugs--that the
programmer didn't even know existed--creeping in.
Hopefully locks can be requested when the file is open FOR BOTH?
.=================================================.
| Christopher BRIAN Jack aka "Gau of the Veldt" |
+================================================='
| oevna at ...1544...
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...
Hi Humans, my email address uses rot13 cipher
More information about the User
mailing list