Closed ultraq closed 4 years ago
Had a look at it, and the cancellation status can really only be queried from the thing that created the FutureTask
, rather than the task itself, unless I want to make use of InterruptedException
s 😕 I think what I really need here is some kind of "Cancellable" object, of which I have a few right now (the various engine subsystems, and the decoding tasks), so maybe I should expand on that concept and find a way to implement it
Having a look at the different implementations so far, I'm going to close this one without doing anything. Each one is subtley different in their own way (Workers, Engines, Playable media), and trying to unify them might just make things worse.
It looks like
FutureTask
already has a lot of methods on it to create a cancellable task to run on a different thread. Instead of continuing with my customWorker
, maybe try use aFutureTask
instead so I don't have to rebuild these threading primitives?