|
Posted by Jerry Stuckle on 07/02/07 23:22
Sergei Shelukhin wrote:
> Well, I wonder if I could suggest a fix?
> "But it also means only one thread can have the file open at a time."
> - the solution for this is implied in one of the posts where I was
> still unsure about how it works - a thread could open the file
> exclusively, write to it, and then unlock it; reading could be done
> without locking the file (if the file is currently locked then there
> should be a reasonable/configurable timeout).
>
> E.g. a standard reader-writer lock pattern.
>
>
>
>
By definition, if you open a session, you open it for both reading and
writing.
If you only want it open for reading, it's simple. Open the session,
cache the data you need then close the session.
Or use a different language. This is how PHP works. And you aren't
going to be able to change it.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|