2014-03-08 21:16 GMT+01:00 Konstantin Kolinko <knst.koli...@gmail.com>:

> My question is that these events are fired while holding a
> "synchronized (writeLock) {" lock.
> Is holding the writeLock lock is needed here.
>
> The "on write possible" event is processed by webapp's code. I think
> that in theory the web application can delegate processing to some
> other thread. That other thread will hang trying to obtain the
> writeLock to perform the actual writing.
>
> I'm not convinced these write locks are needed, there should be no write
concurrency in the first place.

If the consensus is to keep the lock to try to avoid the most serious
corruption issues, then in the onWritePossible method only the call to
writeInternal would need to be locked, not the rest.

Rémy

Reply via email to