puniverse / quasar

Fibers, Channels and Actors for the JVM
http://docs.paralleluniverse.co/quasar/
Other
4.56k stars 574 forks source link

Critical Bug in QueueChannel causes undesired queue consumption behavior #228

Closed sheinbergon closed 8 years ago

sheinbergon commented 8 years ago

Inside

https://github.com/puniverse/quasar/blob/v0.7.6/quasar-core/src/main/java/co/paralleluniverse/strands/channels/QueueChannel.java

See the receive() method in line 353. the sync.unregister call in line 374 is not wrapped in try-finally block. ( as opposed to what happens in the other receive method implementations )

When for example , interrupting a strand doing blocking on receive , channel remains registered , and strand gets an IllegalMonitorStateException

sheinbergon commented 8 years ago

@pron Thanks for the quick fix. When do you think it'll be released as part of new version ?

pron commented 8 years ago

The fix should already be available in 0.7.7-SNAPSHOT. A new release will probably happen in about a week.

sheinbergon commented 8 years ago

@pron thank you very much for the quick aid. If you can please have a quick look at https://github.com/puniverse/comsat/issues/77 . An integration behavior became broken since 0.7.6