Open HelgeStenstrom opened 4 years ago
Now i remember where i used this, i used to return i future from submit event and wait fot it to finish before the next event happens.
So if one Thread called stop and one other pause at the same time it is assured that firstly stop or pause will run and not together, to avoid deadlocks.
Now i remembered :)
But that is not the way it works now, since the future is not returned from submit. It's not even created, as far as I can see. It's null, and line 643 will never be executed.
https://github.com/goxr3plus/java-stream-player/blob/d32a46a1f7d105a2c5350ae5bd04fdc1edd47baa/src/main/java/com/goxr3plus/streamplayer/stream/StreamPlayer.java#L121
This object is never written, but it's read at a few places. I think the intention might have been to assign it to the result of
https://github.com/goxr3plus/java-stream-player/blob/d32a46a1f7d105a2c5350ae5bd04fdc1edd47baa/src/main/java/com/goxr3plus/streamplayer/stream/StreamPlayer.java#L577
For usages of this future, see https://github.com/goxr3plus/java-stream-player/blob/d32a46a1f7d105a2c5350ae5bd04fdc1edd47baa/src/main/java/com/goxr3plus/streamplayer/stream/StreamPlayer.java#L638-L676