Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Improved asynchronous programming execution

An asynchronous and asynchronous operation technology, applied in programming languages/paradigms, program control design, software engineering design, etc., can solve problems such as thread blocking

Active Publication Date: 2012-09-19
MICROSOFT TECH LICENSING LLC
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The traditional asynchronous programming model attempts to solve the problem of thread blocking when executing long-running tasks

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Improved asynchronous programming execution
  • Improved asynchronous programming execution
  • Improved asynchronous programming execution

Examples

Experimental program
Comparison scheme
Effect test

example

[0079] class MyOperation : AsyncOperation

[0080] {

[0081] …

[0082] }

[0083] Here, the result of the operation can be obtained after "yield return":

[0084] IEnumerable ExecuteOperation(...)

[0085] {

[0086] …

[0087] yield return myOperationInstance;

[0088] / / handles myOperationInstance. OperationResult...

[0089] …

[0090] }

[0091] In one embodiment, in this regard, exceptions that occur during execution of an operation (e.g., an asynchronous operation, an aggregate operation, and / or a microservice operation) can be obtained in the OperationException field of the operation, as illustrated in the following pseudocode:

[0092] IEnumerable ExecuteOperation(...)

[0093] {

[0094] …

[0095] yield return operation;

[0096] / / handling operation. OperationException...

[0097] …

[0098] }

[0099] In this regard, in one embodiment, the second level of programming execution can run on the second thread a...

Embodiment 500

[0100] This can be overcome, for example, by providing strongly typed operation results at the programming framework level. In this embodiment, with strongly typed operation results, when a subsequent operation accesses a previous operation result and the previous operation failed due to an exception, for example, in this solution, an operation exception in a previous operation can be automatically raised by the framework Spread a rank. This result is available at Figure 5 shown in , as described above. The following is available with Figure 5 An example of the associated pseudocode for Example Embodiment 500:

[0101] class Operation0

[0102] {

[0103] IEnumerator ExecuteOperation(...)

[0104] {

[0105] yield return operation1;

[0106] yield return operation2;

[0107] yield return operation9;

[0108] }

[0109] }

[0110] class Operation2

[0111] {

[0112] IEnumerator ExecuteOperation(...)

[0113] {

[0114] yield return...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

One or more techniques and / or systems are disclosed for improving asynchronous programming execution at runtime. Asynchronous programming code can comprise more than one level of hierarchy, such as in an execution plan. Respective aggregation operations in a portion of the asynchronous programming code are unrolled, to create a single level iterative execution, by combining elements of the multi-level iterative execution of the asynchronous programming code. In this way, the aggregation operations are concatenated to local logic code for the aggregation operations. Thread context switching in the unrolled portion of asynchronous programming code is performed merely at an asynchronous operation, thereby mitigating unnecessary switches. Exceptions thrown during programming code can be propagated up to a top of a virtual callstack for the execution.

Description

Background technique [0001] Programming code may be written in a synchronous manner, which may include executing code in a sequential manner. For example, a first operation may be performed, and the result of the first operation may be used as input for a second operation. This type of programming is usually easy to write, but may not be efficient to execute (e.g. where the output of a first operation is used as input to a second operation, the second operation may have to wait a considerable amount of time for the first operation to execute complete, then the second operation can start executing). For example, when there are long I / O calls, where results may take a long time to return, in synchronous programming execution, the code execution process thread may become blocked. In this instance, continuation of programming may be halted when a thread is blocked from continuing execution. Asynchronous programming provides multithreaded execution of programming by performing s...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/44
CPCG06F8/4443G06F8/31G06F9/45504G06F9/4843G06F9/45525G06F9/44
Inventor 赵晓绚S.史林尼瓦森周翔江逢斌
Owner MICROSOFT TECH LICENSING LLC
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products