Menu

#7 blocking_dequeue exit/enter monitor too often

open
nobody
None
5
2003-09-17
2003-09-17
Anonymous
No

For all 3 blocking_dequeue, I see the loop exits and
enters the monitor endlessly.
The synchronized statement should be outside the loop.

synchronized (blocker) { //moved here
while (true) {
//synchronized (blocker) { //HACK: do not
re-synchronize move out of loop

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.