This content has been marked as final.
Show 2 replies
-
1. Re: Elegant way of Variable Latch for the waits on AIO?
timfox May 7, 2008 2:38 AM (in response to clebert.suconic)You could just store the count in an AtomicInteger before commit.
Then, when commit (or rollback) arrives if the count != 0 (in many cases it may already be zero) either create a CountDownLatch (or use Object.wait/notify) to wait for the remaining persistences. -
2. Re: Elegant way of Variable Latch for the waits on AIO?
timfox May 7, 2008 2:46 AM (in response to clebert.suconic)This may be preferable to object wait/notify, since you want to avoid contention between many threads setting the count which you'd likely get with an object wait/notify approach.