Common `Cancelable` interface?
See original GitHub issueI think it would be an improvement to align Job
, Deferred
, and Channel
under a common Cancelable
interface. It doesn’t have to be named that, but I think it should be similar to the RxJava Disposable interface, perhaps having the equivalent of 2 methods, cancel
, and isCancelled
. Perhaps it would be appropriate to break out the isActive
, and isCompleted
into their own interfaces as well?
Having a utility class that would be the equivalent of the CompositeDisposable would be convenient as well.
I don’t have a problem submitting a PR myself, I thought it appropriate to discuss this first though.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Uses of Interface java.util.concurrent.Cancellable
interface, ScheduledCancellable. A delayed or periodic action that can be cancelled. ; interface, ScheduledFuture<V>
Read more >java.util.concurrent Interface Cancellable
Something, usually a task, that can be cancelled. Cancellation is performed by the cancel method. Additional methods are provided to determine if the...
Read more >Commonly used Java -able Interfaces and Classes
The enumeration of commonly used Java interfaces and classes that ends ... The Undo operation is used to cancel the last applied command....
Read more >Cancel vs Close: Design to Distinguish the Difference
Distinguishing between close and cancel is critical to avoiding losing users' work.
Read more >User interface - cancel order screen - IBM
Migration strategy. To configure the cancellation reasons for a specific version of the Sterling Store application, define qualifiers for the common codes.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Currently,
CoroutineScope
provides a mechanism for abstracting any computation/scope (whether it is an actor, job or a future), the new interface may add even more confusion, so I’d rather not to introduce it.Bare channel does not. There are
produce
andactor
builders that tie the channel to the job. However, the resulting “channel’s job” is not currently exposed via public api.