PHP 8.5.0 Alpha 1 available for testing

Voting

: min(nine, two)?
(Example: nine)

The Note You're Voting On

narf at devilix dot net
10 years ago
The suggestion that you should free the lock as soon as possible is WRONG (and for some reason, I can't downvote it right now).

Releasing the lock before the write() call is as effective as not using locks at all. The whole point is that a concurrent read() HAS to be blocked until the session is closed, otherwise you'll have race conditions.

If you care about the performance aspect, you should take care to call session_write_close() as soon as possible instead.

<< Back to user notes page

To Top