Asynchronous dispatcher for application framework
AssigneeHome Box Office, Inc.
InventorsPatrick Finnigan, Nathan J. E. Furtwangler, Brendan Joseph Clark, Brandon C. Furtwangler
Life of this patent
Estimating the term…
Abstract
The described technology is directed towards an asynchronous dispatcher including control logic that manages a queue set, including to dequeue and execute work items from the queue on behalf of application code executing in a program. The dispatcher yields control to the program to allow the program and application code to be responsive with respect to user interface operations.
Claims20
A system, comprising:
- a processor;
- and
- a memory communicatively coupled to the processor, the memory having stored therein computer-executable instructions, comprising:
- an asynchronous dispatcher, the asynchronous dispatcher coupled to a queue set comprising at least a pending queue, a post queue, and a background queue, wherein the asynchronous dispatcher is configured to:
- dequeue and execute work items from the queue set on behalf of application code running in a program within a frame;
- and
- in response to at least one work item remaining in the queue set after a threshold cutoff time that is prior to an end-of-frame time boundary of the frame, yield execution control to the program, and schedule a callback from the program to the asynchronous dispatcher to dequeue and execute the at least one work item at start of a next frame:
- wherein the asynchronous dispatcher includes a first component having independent operations that are independent of a platform and a second component having dependent operations that are dependent on the platform:
- wherein the independent operations are selected from a group comprising:
- addition of a work item to the pending queue, addition of the work item to the post queue, and addition of the work item to the background queue:
- and
- wherein the asynchronous dispatcher is configured to attempt to dequeue and execute work items that exist in the pending queue and the post queue at the start of the frame, before attempt to dequeue and execute any work items from the background queue.
A method comprising:
- in response to determining within a frame that at least one work item exists in a queue set comprising at least a pending queue, a post queue, and a background queue, dequeuing and executing, by a system comprising a processor via an asynchronous dispatcher, a work item of the at least one work item on behalf of application code running in a program;
- and
- in response to determining at least one work item remaining in the queue set after a threshold cutoff time that is prior to an end-of-frame time boundary of the frame, yielding, by the asynchronous dispatcher, execution control to the program, and scheduling a callback from the program to the asynchronous dispatcher to dequeue and execute the at least one work item at start of a next frame:
- wherein the asynchronous dispatcher includes a first component having independent operations that are independent of a platform and a second component having dependent operations that are dependent on the platform:
- wherein the independent operations are selected from a group comprising:
- addition of a work item to the pending queue, addition of the work item to the post queue, and addition of the work item to the background queue:
- and
- wherein the asynchronous dispatcher is configured to attempt to dequeue and execute work items that exist in the pending queue and the post queue at the start of the frame, before attempt to dequeue and execute any work items from the background queue.
A non-transitory machine-readable media having machine-executable instructions, which when executed by a processor perform operations, comprising:
- in response to determining within a frame that at least one work item exists in a queue set comprising at least one queue, dequeuing and executing, by an asynchronous dispatcher, a work item of the at least one work item on behalf of application code running in a program;
- and
- in response to determining at least one work item remaining in the queue set after a threshold cutoff time that is prior to an end-of-frame time boundary of the frame, yielding, by the asynchronous dispatcher, execution control to the program, and scheduling a callback from the program to the asynchronous dispatcher to dequeue and execute the at least one work item at start of a next frame:
- wherein the asynchronous dispatcher includes a first component having independent operations that are independent of a platform and a second component having dependent operations that are dependent on the platform:
- wherein the independent operations are selected from a group comprising:
- addition of a work item to the pending queue, addition of the work item to the post queue, and addition of the work item to the background queue:
- and
- wherein the asynchronous dispatcher is configured to attempt to dequeue and execute work items that exist in the pending queue and the post queue at the start of the frame, before attempt to dequeue and execute any work items from the background queue.
A method comprising:
- executing, by a system comprising a processor, a work item processing routine, comprising:
- combining zero or more post work items and zero or more post queue work items into a current queue;
- determining whether a work item exists in a queue set comprising at least the current queue and a background queue having zero or more background work items, based on evaluating the current queue for a work item, and if empty, evaluating the background queue;
- in response to determining that the work item exists in the queue set, dequeuing the work item and executing the work item;
- determining whether to yield control to a program;
- in response to determining that the control is to be yielded to the program, yielding the control to the program;
- and
- in response to determining that the control is not to be yielded to the program, re-executing the work item processing routine.
Dependencies are inferred from the claim text.