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
CancellableContinuation interface should cease to extend Job interface. Job is too "heavy weight". Job has a concept of "children" and "completing" state where it waits for its children to complete. None of that is applicable to CancellableContinuation. It has much simpler state-machine. Thus, Job has many methods and extensions that are not truly applicable to CancellableContinuation.
From implementation standpoint, CancellableContinuation has to extend JobSupport for all that Job machinery which is not needed. This complicates the code itself and makes it harder to performance-optimize CancellableContinuation to its specific use-cases.
CancellableContinuation will still keep many methods from the Job, notably invokeOnCompletion, cancel and isActive/isCompleted/isCancelled.
The text was updated successfully, but these errors were encountered:
elizarov
changed the title
CancelleableContinuation should not be a Job
CancellableContinuation should not be a Job
Feb 5, 2018
CancellableContinuation
interface should cease to extendJob
interface.Job
is too "heavy weight". Job has a concept of "children" and "completing" state where it waits for its children to complete. None of that is applicable toCancellableContinuation
. It has much simpler state-machine. Thus,Job
has many methods and extensions that are not truly applicable toCancellableContinuation
.From implementation standpoint,
CancellableContinuation
has to extendJobSupport
for all that Job machinery which is not needed. This complicates the code itself and makes it harder to performance-optimizeCancellableContinuation
to its specific use-cases.CancellableContinuation
will still keep many methods from theJob
, notablyinvokeOnCompletion
,cancel
andisActive
/isCompleted
/isCancelled
.The text was updated successfully, but these errors were encountered: