# US 2017/0364393 A1 · Asynchronous dispatcher for application framework

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0364393 A1
- Document ID: US20170364393A1
- Status: Published application
- Kind: A1
- Application number: 15/692,055
- Filed: 2017-08-31
- Published: 2017-12-21
- Earliest claimed: 2014-07-24
- Assignees: Home Box Office, Inc.
- Applicants: Home Box Office, Inc.
- Inventors: Patrick Finnigan; Nathan J. E. Furtwangler; Brendan Joseph Clark; Brandon C. Furtwangler
- Web page: https://patentgrep.com/patent/US20170364393A1

## CPC

- G06F 9/5083: {Techniques for rebalancing the load in a distributed system}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## 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.

## Claims

### Claim 1

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 one 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.

### Claim 2 (depends on 1)

The system of claim 1, wherein the asynchronous dispatcher is configured to, in response to the 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, schedule a callback from the program to the asynchronous dispatcher to dequeue and execute the at least one work item at the start of a next frame.

### Claim 3 (depends on 1)

The system of claim 1, wherein the application code comprises a single-threaded application.

### Claim 4 (depends on 1)

The system of claim 1, wherein the application code is written in JavaScript®.

### Claim 5 (depends on 1)

The system of claim 1, wherein the program comprises a browser that hosts the asynchronous dispatcher and that executes the application code.

### Claim 6 (depends on 1)

The system of claim 1, 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.

### Claim 7 (depends on 6)

The system of claim 6, wherein the queue set comprises a pending queue, a post queue, and a background queue, and wherein the independent operations are selected from the group consisting of: 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.

### Claim 8 (depends on 6)

The system of claim 6, wherein the independent operations are selected from the group consisting of: execution of a work item after a specified timeout duration, and execution of a work item at an interval of a specified duration.

### Claim 9 (depends on 1)

The system of claim 1, wherein the queue set comprises a pending queue, a post queue and a background queue.

### Claim 10 (depends on 9)

The system of claim 9, wherein the asynchronous dispatcher is configured to dequeue and execute work items from a current queue comprising work items from the pending queue and work items from the post queue at the start of the frame, and in response to work items remaining in the current queue before the execution control is yielded to the program, to queue the work items remaining in the pending queue for processing in a later frame.

### Claim 11

A method 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 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.

### Claim 12 (depends on 11)

The method of claim 11 wherein the queue set comprises a current queue having zero or more pending work items combined with zero or more post work items that were previously queued, and a background queue having zero or more background work items and wherein the determining at the start of the frame whether at least one work item exists in the queue set comprises evaluating the current queue for work items, and if empty, evaluating the background queue for work items.

### Claim 13 (depends on 11)

The method of claim 11, further comprising determining the threshold cutoff time based upon a historical amount of time between completing a last work item in the at least one queue and a start time of a next frame.

### Claim 14 (depends on 12)

The method of claim 12, further comprising, combining pending work items and post queue work items into the current queue at the start of the frame.

### Claim 15 (depends on 12)

The method of claim 12, further comprising, receiving a new pending work item during the dequeuing and executing, and queuing the new pending work item into the current queue.

### Claim 16 (depends on 12)

The method of claim 12, further comprising, receiving a new post queue work item during the dequeuing and executing, and queuing the post queue work item into the post queue for dequeuing and executing during a later frame.

### Claim 17 (depends on 11)

The method of claim 11, further comprising, in response to the 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, scheduling a callback from the program to the asynchronous dispatcher to dequeue and execute the at least one work item at the start of a next frame.

### Claim 18

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.

### Claim 19 (depends on 18)

The non-transitory machine-readable media of claim 18, the operations further comprising determining the threshold cutoff time based upon a historical amount of time between completing a last work item in the at least one queue and a start time of a next frame.

### Claim 20 (depends on 18)

The non-transitory machine-readable media of claim 18, the operations further comprising, in response to the 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, scheduling a callback from the program to the asynchronous dispatcher to dequeue and execute the at least one work item at the start of a next frame.
