You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.log(Level.WARNING, "Problem in StreamPlayer generateEvent() method", ex);
}
return"Problem in StreamPlayer generateEvent() method";
}
From what I understand, there is a StreamPlayerEventLauncher task which holds information about source, player position, a list of listeners and some other stuff.
The task is submitted to eventsExecutorService.submit(task) and returns a Future.
Then .get() is called on this object. get() blocks until the task is done, i.e., until all listeners have been notified by the call() method of the StreamPlayerEventLauncher.
Since get() is blocking, I wonder why this has to be in a separate thread. What is the lifetime of the thread? It seems to be extremely short, or am I wrong?
Wouldn't the behavior be the same with a simple
new StreamPlayerEventLauncher(this, status, encodedStreamPosition, description, listeners).call();
and no eventsExecutorService at all?
The text was updated successfully, but these errors were encountered:
Can you please explain a bit how this works:
java-stream-player/src/main/java/com/goxr3plus/streamplayer/stream/StreamPlayer.java
Lines 206 to 224 in d32a46a
From what I understand, there is a StreamPlayerEventLauncher task which holds information about source, player position, a list of listeners and some other stuff.
The task is submitted to eventsExecutorService.submit(task) and returns a Future.
Then .get() is called on this object. get() blocks until the task is done, i.e., until all listeners have been notified by the call() method of the StreamPlayerEventLauncher.
Since get() is blocking, I wonder why this has to be in a separate thread. What is the lifetime of the thread? It seems to be extremely short, or am I wrong?
Wouldn't the behavior be the same with a simple
new StreamPlayerEventLauncher(this, status, encodedStreamPosition, description, listeners).call();
and no eventsExecutorService at all?
The text was updated successfully, but these errors were encountered: