IP Library Granted Patent US 10,372,509
Granted Patent B2
US 10,372,509 · App. 15/715,919 · Granted Aug 6, 2019

Composable and cancelable dataflow continuation passing

Inventors: John Duffy (Renton, WA); Stephen H. Toub (Seattle, WA)
Assignee: Microsoft Technology Licensing, LLC
G06F9/52
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,372,509
App. No.
15/715,919
Granted
Aug 6, 2019
Kind
B2
Abstract

Parallel tasks are created, and the tasks include a first task and a second task. Each task resolves a future. At least one of three possible continuations for each of the tasks is supplied. The three continuations include a success continuation, a cancellation continuation, and a failure continuation. A value is returned as the future of the first task upon a success continuation for the first task. The value from the first task is used in the second task to compute a second future. The cancellation continuation is supplied if the task is cancelled and the failure continuation is supplied if the task does not return a value and the task is not cancelled.

Claims (41)

1. A computer readable storage medium storing computer-executable instructions for controlling a computing device to:

create plurality of parallel tasks including a first task and a second task in a data flow at runtime, wherein each task resolves a future;

supply at least one of three possible continuations for each of the tasks including a success continuation, a cancellation continuation, and a failure continuation;

return a value as the future of the first task upon a success continuation for the first task; and

apply the value in the second task to compute a second future;

wherein the cancellation continuation is supplied if the first task is cancelled and the failure continuation is supplied with an exception if the first does not return a value and the first task is not cancelled.

2. The computer readable storage medium of claim 1 wherein the tasks are provided as a future type.

3. The computer readable storage medium of claim 1 , the computer-executable instructions for controlling the computing device to:

return a second value as the second future upon a success continuation of the second task.

4. The computer readable storage medium of claim 3 wherein an additional task chained to the tasks such that the additional task uses the second value to compute an additional future and returns an additional value upon a success continuation of the additional task.

5. The computer readable storage medium of claim 1 wherein an additional task is chained to the first task such that the additional task uses the first value to compute an additional future and returns an additional value upon a success continuation of the additional task.

6. The computer readable storage medium of claim 1 wherein the tasks are self contained.

7. The computer readable storage medium of claim 1 , wherein the continuations are supplied at a time the tasks are created.

8. The computer readable storage medium of claim 1 , wherein the tasks are asynchronous.

9. The computer readable storage medium of claim 1 , wherein the tasks are composable.

10. The computer readable storage medium of claim 1 , wherein the tasks are not blocked.

11. The computer readable storage medium of claim 1 , the computer-executable instructions for controlling the computing device to:

supply one of three possible continuations.

12. A method, comprising:

creating a plurality of parallel tasks including a first task and a second task in a data flow at runtime, wherein each task resolves a future;

supplying at least one of three possible continuations for each of the tasks including a success continuation, a cancellation continuation, and a failure continuation;

returning a value as the future of the first task upon a success continuation for the first task; and

applying the value in the second task to compute a second future;

wherein the cancellation continuation is supplied if the first task is cancelled and the failure continuation is supplied with an exception if the first task does not return a value and the first task is not cancelled.

13. The method of claim 12 comprising:

composing the tasks as data dependent asynchronous computations together in a parent-child chain having an parent task invoking a child task.

14. The method of claim 13 comprising:

passing one of the three continuations to a data-dependent dataflow computation in the chain including passing the returned value with the success continuation from the child task to the parent task and passing the cancellation continuation from the parent task to the child task.

15. The method of claim 14 wherein composing the data dependent asynchronous computations together in a chain comprises avoiding blocking of the computations.

16. A system, comprising:

memory to store a set of instructions; and

a processor to execute the set of instructions to:

create a plurality of parallel tasks including a first task and a second task in a data flow at runtime, wherein each task resolves a future;

supply at least one of three possible continuations for each of the tasks including a success continuation, a cancellation continuation, and a failure continuation;

return a value as the future of the first task upon a success continuation for the first task; and

apply the value in the second task to compute a second future;

wherein the cancellation continuation is supplied if the first task is cancelled and the failure continuation is supplied with an exception if the first task does not return a value and the first task is not cancelled.

17. The system of claim 16 wherein the set of instructions control a computerized managed environment.

18. The system of claim 17 wherein the managed environment supports a plurality of composable data-dependent dataflow computations.

19. The system of claim 16 wherein each continuation represents a control state given a point in the computation.

20. The system of claim 16 wherein each task resolves a future representing a value to be computed in the future and includes a control state to complete the computation.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 26, 2017
From: DUFFY, JOHN; TOUB, STEPHEN H.
To: MICROSOFT CORPORATION
Reel/Frame 043704/0403 →
Continuity (2)
Continuation 12131812 · Jun 2, 2008
Related Publication 20180129543A1 · May 10, 2018