Re: Re: [VOTE] Introduce session.lock, session.lazy_write and session.lazy_destory

From: Date: Thu, 30 Jan 2014 04:50:40 +0000
Subject: Re: Re: [VOTE] Introduce session.lock, session.lazy_write and session.lazy_destory
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
> To solve all three problems, I'd suggest
>
> - unconditional taking of the flock(LOCK_EX) in ps_files_open(), while
keeping
> the LOCK_UN in PS_READ_FUNC/PS_WRITE_FUNC (if minimize_lock=true).

Clarification: unconditionally in case of minimize_lock=true means taking
the LOCK_EX after the huge if, right at the end of ps_files_open, i.e. even
when data->fd was already >= 0. Otherwise the write case would miss the
lock.

If that seems strange in ps_files_open then the LOCK_EX could be placed in
PS_READ_FUNC and PS_WRITE_FUNC directly after successful call to
ps_files_open - doing it that way would have the advantage of making a
local code review in each of the functions self-contained wrt the locking.

best regards
  Patrick


Thread (42 messages)

« previous php.internals (#71771) next »