I dont think that there is a 'built-in' way to do this. Best way I can think
of would be to stick your file.open() in a loop until it can aquire a lock
on the file.
"Ron Vecchi" <vencenzocomcast.net> wrote in message
news:upfFvZ8UDHA.1052TK2MSFTNGP09.phx.gbl...time> I have a single line file where the line will be read and updated eachwrite> it is opened.
> My question is I need to open it with a lock so noone else can read orto> to it untill the lock is released.
> The problem seems that what If it is locked and A different request triesout> open it. From what I understand an exception will be thrown.
> It is critical that each request reads the file. Is there an easy way to
> make a request wait untill the file can be opened then read from it with> generating the exception.
> Ron Vecchi