Performing a wait operation to wait for one or more tasks to complete

US9229788B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9229788-B2
Application numberUS-73255210-A
CountryUS
Kind codeB2
Filing dateMar 26, 2010
Priority dateMar 26, 2010
Publication dateJan 5, 2016
Grant dateJan 5, 2016

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A method of performing a wait operation includes creating a first plurality of tasks and a continuation task. The continuation task represents a second plurality of tasks. The continuation task and each of the tasks in the first plurality have an associated wait handle. The wait handles for the first plurality of tasks and the continuation task are stored in an array. A wait operation is performed on the array, thereby waiting for at least one of the tasks in the first and second pluralities to complete.

First claim

Opening claim text (preview).

What is claimed is: 1. A method of performing a wait operation, comprising: creating a first plurality of tasks and a continuation task, the continuation task representing a second plurality of tasks, the continuation task and the tasks in the first plurality each having an associated wait handle, wherein the continuation task representing the second plurality of tasks is automatically created in response to a determination that a total number of tasks in the first and second pluralities is greater than a fixed system limit; storing the wait handles for the first plurality of tasks and the continuation task in an array without storing a wait handle for any task in the second plurality in the array; performing a wait operation on the array to wait for at least one of the tasks in both of the first and second pluralities to complete; and wherein the creating, storing, and performing are performed by at least one processor. 2. The method of claim 1 , wherein the tasks in the first and second pluralities represent asynchronous operations that are configured to be executed in a parallel manner by a plurality of processors. 3. The method of claim 1 , wherein the wait operation waits for any of the tasks in the first and second pluralities to complete. 4. The method of claim 1 , wherein the wait operation waits for all of the tasks in the first and second pluralities to complete. 5. The method of claim 4 , and further comprising: inlining at least one of the tasks in the first plurality by running the at least one task to completion on a current thread rather than waiting for the at least one task to complete on another thread. 6. The method of claim 1 , and further comprising: storing a wait handle for a cancellation token in the array. 7. The method of claim 6 , wherein performing the wait operation on the array results in an operation canceled exception being thrown when the wait handle for the cancellation token is set. 8. The method of claim 1 , and further comprising: determining whether a total number of tasks to be waited on is greater than a fixed system limit. 9. The method of claim 8 , and further comprising: creating the continuation task in response to a determination that the total number of tasks to be waited on is greater than the fixed system limit. 10. The method of claim 9 , and further comprising: decrementing a counter with each task in the second plurality when the task completes; and signaling the continuation to run with a last task to decrement the counter. 11. A computer-readable storage medium storing computer-executable instructions that when executed by at least one processor cause the at least one processor to perform a method of performing a wait operation, the method comprising: creating a first plurality of tasks; determining whether a total number of tasks in the first plurality is greater than a fixed system limit; creating a continuation task in response to a determination that the total number of tasks in the first plurality is greater than the fixed system limit, the continuation task representing a first subset of the first plurality of tasks; storing a wait handle for the continuation task and each task in a second subset of the first plurality of tasks in an array without storing a wait handle for any task in the first subset in the array; and performing a wait operation on the array to wait for at least one of the tasks in both of the first and second subsets of the first plurality to complete. 12. The computer-readable storage medium of claim 11 , wherein the tasks in the first plurality represent asynchronous operations that are configured to be executed in a parallel manner by a plurality of processors. 13. The computer-readable storage medium of claim 11 , wherein the wait operation waits for any of the tasks in the first plurality to complete. 14. The computer-readable storage medium of claim 11 , wherein the wait operation waits for all of the tasks in the first plurality to complete. 15. The computer-readable storage medium of claim 11 , wherein the method further comprises: storing a wait handle for a cancellation token in the array. 16. The computer-readable storage medium of claim 15 , wherein performing the wait operation on the array results in an operation canceled exception being thrown when the wait handle for the cancellation token is set. 17. A method of performing a wait all operation, comprising: creating a first plurality of tasks; providing at least one cancellation token for each task in the first plurality of tasks; storing a wait handle for each task and for the at least one cancellation token in at least one array; for each task in the first plurality, performing a wait any operation on both the wait handle for the task and the wait handle for the at least one cancellation token to wait for any of completion of the task or cancellation, wherein performing the wait any operation for each task in the first plurality results in waiting for all of the tasks in the first plurality to complete with cancellation support; and wherein the creating, providing, storing, and performing are performed by at least one processor. 18. The method of claim 17 , wherein the tasks in the first plurality represent asynchronous operations that are configured to be executed in a parallel manner by a plurality of processors. 19. The method of claim 17 , wherein performing the wait any operation results in an operation canceled exception being thrown when the wait handle for the at least one cancellation token is set.

Assignees

Inventors

Classifications

  • G06F9/522Primary

    Barrier synchronisation · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9229788B2 cover?
A method of performing a wait operation includes creating a first plurality of tasks and a continuation task. The continuation task represents a second plurality of tasks. The continuation task and each of the tasks in the first plurality have an associated wait handle. The wait handles for the first plurality of tasks and the continuation task are stored in an array. A wait operation is perfor…
Who is the assignee on this patent?
Toub Stephen H, Hoag Joseph E, Yildiz Huseyin S, and 4 more
What technology area does this patent fall under?
Primary CPC classification G06F9/522. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jan 05 2016 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).