Annotations for dynamic dispatch of threads from scripting language code
First Claim
Patent Images
1. A non-transitory computer-readable medium storing instructions, the instructions comprising:
- one or more instructions that, when executed by one or more processors, cause the one or more processors to;
obtain scripting language code that references a collection of code for executing a first task and a second task,a first portion of the collection of code being associated with a first annotation, of a plurality of annotations, associated with the first task, anda second portion of the collection of code being associated with a second annotation, of the plurality of annotations, associated with the second task,select, for each of the first task and the second task, one of a plurality of threads based on the plurality of annotations,the first annotation specifying a first type of thread to which the first portion of the collection of code should be dispatched, andthe second annotation specifying a second type of thread to which the second portion of the collection of code should be dispatched;
dispatch, based on the first annotation specifying the first type of thread, the first task to a first thread, of the plurality of threads, for executing the first task in a scripting language environment;
dispatch, based on the second annotation specifying the second type of thread, the second task to a second thread, of the plurality of threads, included in a non-scripting language environment,the first task or the second task not being dispatched to one or more threads, of the plurality of threads, based on a third annotation, of the plurality of annotations,the third annotation specifying an identity of the one or more threads and indicating that the first task or the second task should not be dispatched to the identified one or more threads; and
cause an execution of the scripting language code,during the execution of the scripting language code, the first task being executed via the first thread in the scripting language environment and the second task being executed via the second thread in the non-scripting language environment.
1 Assignment
0 Petitions
Accused Products
Abstract
Exemplary embodiments provide annotations for dynamic dispatch of threads from scripting language code. Exemplary embodiments may provide scripting language code and execute the code causing examination of at least one annotation associated with a referenced collection of code. Exemplary embodiments may dynamically dispatch a first task to a first thread automatically from the scripting language code at runtime based on the examination of the at least one annotation associated with the referenced collection of code.
-
Citations
25 Claims
-
1. A non-transitory computer-readable medium storing instructions, the instructions comprising:
one or more instructions that, when executed by one or more processors, cause the one or more processors to; obtain scripting language code that references a collection of code for executing a first task and a second task, a first portion of the collection of code being associated with a first annotation, of a plurality of annotations, associated with the first task, and a second portion of the collection of code being associated with a second annotation, of the plurality of annotations, associated with the second task, select, for each of the first task and the second task, one of a plurality of threads based on the plurality of annotations, the first annotation specifying a first type of thread to which the first portion of the collection of code should be dispatched, and the second annotation specifying a second type of thread to which the second portion of the collection of code should be dispatched; dispatch, based on the first annotation specifying the first type of thread, the first task to a first thread, of the plurality of threads, for executing the first task in a scripting language environment; dispatch, based on the second annotation specifying the second type of thread, the second task to a second thread, of the plurality of threads, included in a non-scripting language environment, the first task or the second task not being dispatched to one or more threads, of the plurality of threads, based on a third annotation, of the plurality of annotations, the third annotation specifying an identity of the one or more threads and indicating that the first task or the second task should not be dispatched to the identified one or more threads; and cause an execution of the scripting language code, during the execution of the scripting language code, the first task being executed via the first thread in the scripting language environment and the second task being executed via the second thread in the non-scripting language environment. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
12. A method comprising:
-
associating a first annotation, of a plurality of annotations, with a first portion of a collection of code and a second annotation, of the plurality of annotations, with a second portion of the collection of code, the first annotation being associated with a first task associated with an execution of the first portion of the collection of code, the second annotation being associated with a second task associated with an execution of the second portion of the collection of code, and associating the first annotation with the first portion of the collection of code and the second annotation with the second portion of the collection of code being performed by a device; obtain scripting language code that references the collection of code, obtaining the scripting language code being performed by the device; selecting, for each of the first task and the second task, one of a plurality of threads based on the plurality of annotations, selecting the one of the plurality of threads being performed by the device; determining, based on the first annotation identifying a first type of thread to which the first portion of the collection of code should be dispatched, to dispatch the first task to a first thread, of the plurality of threads, included in a scripting language environment, determining to dispatch the first task to the first thread being performed by the device; determining, based on the second annotation identifying a second type of thread to which the second portion of the collection of code should be dispatched, to dispatch the second task to a second thread, of the plurality of threads, included in a non-scripting language environment, determining to dispatch the second task to the second thread being performed by the device; dispatching the first task to the first thread and the second task to the second thread, the first task or the second task not being dispatched to one or more threads, of the plurality of threads, based on a third annotation, of the plurality of annotations, the third annotation specifying an identity of the one or more threads and indicating that the first task or the second task should not be dispatched to the identified one or more threads, and dispatching the first task and the second task being performed by the device; and causing an execution of the scripting language code, causing the execution of the scripting language code being performed by the device, and during the execution of the scripting language code, the first task being executed via the first thread in the scripting language environment and the second task being executed via the second thread in the non-scripting language environment. - View Dependent Claims (13, 14)
-
-
15. A system comprising:
one or more processors to; obtain scripting language code that references a collection of code, the collection of code for executing a first task and a second task, a first portion of the collection of code being associated with a first annotation, of a plurality of annotations, and a second portion of the collection of code being associated with a second annotation, of the plurality of annotations, the first annotation identifying a first type of thread to which the first portion of the collection of code is to be dispatched, and the second annotation identifying a second type of thread to which the second portion of the collection of code is to be dispatched; select, for each of the first task and the second task, one of the plurality of threads based on the plurality of annotations; dispatch, based on the first annotation specifying the first type of thread, the first task to a first thread, of the plurality of threads, for executing the first task in a scripting language environment; dispatch, based on the second annotation specifying the second type of thread, the second task to a second thread, of the plurality of threads, included in a non-scripting language environment, the first task or the second task not being dispatched to one or more of threads, of the plurality of threads, based on a third annotation, of the plurality of annotations, the third annotation specifying an identity of the one or more threads and indicating that the first task or the second task should not be dispatched to the identified one or more threads; and cause an execution of the scripting language code, during the execution of the scripting language code, the first task being executed via the first thread in the scripting language environment and the second task being executed via the second thread in the non-scripting language environment. - View Dependent Claims (16, 17)
-
18. A non-transitory computer-readable medium storing instructions, the instructions comprising:
one or more instructions that, when executed by one or more processors, cause the one or more processors to; obtain scripting language code to be executed in a distributed computing environment, the distributed computing environment including a plurality of computing devices, the scripting language code referencing a collection of code for executing a first task and a second task, a first portion of the collection of code being associated with a first annotation, of a plurality of annotations, associated with the first task, the first annotation identifying a first type of thread to which the first portion of the collection of code is to be dispatched, and a second portion of the collection of code being associated with a second annotation, of the plurality of annotations, associated with the second task, the second annotation identifying a second type of thread to which the second portion of the collection of code is to be dispatched; select, for each of the first task and the second task, one of a plurality of threads based on the plurality of annotations, dispatch, based on the first annotation identifying the first type of thread, the first task to a first thread, of the plurality of threads, running in a scripting language environment on a first computing device in the plurality of computing devices; dispatch, based on the second annotation identifying the second type of thread, the second task to a second thread, of the plurality of threads, running in a non-scripting language environment on a second computing device in the plurality of computing devices, the first task or the second task not being dispatched to one or more of threads, of the plurality of threads, based on a third annotation, of the plurality of annotations, the third annotation specifying an identity of the one or more threads and indicating that the first task or the second task should not be dispatched to the identified one or more threads; and cause an execution of the scripting language code, during the execution of the scripting language code, the first task being executed via the first thread and the second task being executed via the second thread. - View Dependent Claims (19, 20, 21, 22)
-
23. One or more non-transitory computer-readable media storing instructions, the instructions comprising:
one or more instructions that, when executed by one or more computing devices, cause the one or more computing devices to; obtain a scripting language code that is associated with a collection of code for executing a first task and a second task; select, for each of the first task and the second task, one of a plurality of threads based on a plurality of annotations included in the collection of code; dispatch the first task to a first thread, of the plurality of threads, in a scripting language environment based on a first annotation, of the plurality of annotations included in the collection of code, identifying a first type of thread to which the first task should be dispatched; dispatch the second task to a second thread, of the plurality of threads, in a non-scripting language environment based on a second annotation, of the plurality of annotations included in the collection of code, identifying a second type of thread to which the second task should be dispatched, the first task or the second task not being dispatched to one or more of threads, of the plurality of threads, based on a third annotation, of the plurality of annotations, the third annotation specifying an identity of the one or more threads and indicating that the first task or the second task should not be dispatched to the identified one or more threads; and cause an execution of the scripting language code, during the execution of the scripting language code, the first task being executed via the first thread in the scripting language environment and the second task being executed via the second thread in the non-scripting language environment. - View Dependent Claims (24, 25)
Specification