Method and system for synchronizing and joining multiple calls to the same asynchronous code segment
Abstract:
Technologies are provided for synchronizing and joining multiple calls from a first thread and one or more second threads to execute a particular code segment. In response to a call from the first thread to execute the particular code segment, a task synchronizer module calls the particular code segment on behalf of the first thread. When execution of the particular code segment starts, and a call is received from a second thread to execute the particular code segment after receiving the call from the first thread, the task synchronizer module suspends execution of the particular code segment so that the second thread awaits for the execution of the particular code segment on behalf of the first thread to complete. When execution completes, a result value or exception is stored in a task object, and the second thread can read the result value or the exception.
Information query
Patent Agency Ranking
0/0