Synchronous operation method performance in context of asynchronous event loop
US-10628189-B2 · Apr 21, 2020 · US
US12045669B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-12045669-B2 |
| Application number | US-202017127130-A |
| Country | US |
| Kind code | B2 |
| Filing date | Dec 18, 2020 |
| Priority date | Dec 18, 2020 |
| Publication date | Jul 23, 2024 |
| Grant date | Jul 23, 2024 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
A method for execution of a synchronous operation in an asynchronous operational environment includes receiving, by a processor, a first operation from program code executing within the asynchronous operational environment with the program code being run on an execution thread and a communication thread. The method also includes determining, by the processor, if the first operation is a synchronous operation. The method further includes that if the first operation is a synchronous operation, sending a request from the execution thread to the communication thread to perform the first operation and blocking execution of a subsequent operation until a response to the request from the communication thread for the first operation has been completed.
Opening claim text (preview).
What is claimed is: 1. A method for execution of a synchronous operation in an asynchronous operational environment, comprising: receiving, by a processor, a first operation from program code executing within the asynchronous operational environment, the program code being run on an execution thread and a communication thread provided within a virtual user module representing an instance of a virtual user, wherein the execution thread and the communication thread communicate through a message channel including a dual mutex and a communication line with the communication line being separate from the message channel; determining, by the processor, if the first operation is a synchronous operation; and if the first operation is a synchronous operation, sending a request from the execution thread to the communication thread via the message channel and the dual mutex to perform the first operation and blocking execution of a subsequent operation by locking the dual mutex until a response to the request from the communication thread for the first operation has been completed and returned to the execution thread. 2. The method for execution of a synchronous operation in an asynchronous operational environment according to claim 1 , wherein if the first operation is not a synchronous operation, sending a request from the execution thread to the communication thread via the communication line to perform the first operation and allowing execution of a subsequent operation, regardless if a request from the communication thread of the first operation has been completed. 3. The method for execution of a synchronous operation in an asynchronous operational environment according to claim 1 , wherein the dual mutex includes an active mutex including a first data buffer and a passive mutex including a second data buffer, wherein the first data buffer and the second data buffer comprise a dual data buffer for the execution thread and the communication thread for the synchronous operation, and wherein the dual data buffer is always locked during the synchronous operation. 4. The method for execution of a synchronous operation in an asynchronous operational environment according to claim 1 , further comprising: receiving on the message channel from the execution thread to the communication thread, data from the request; reading, by the processor, the data from an active mutex of the execution thread; unlocking, by the processor, the active mutex of the execution thread for writing; swapping, by the processor, the active mutex and a passive mutex of the execution thread; locking, by the processor, the active mutex of the execution thread for writing; and unlocking, by the processor, the active mutex of the execution thread for reading. 5. The method for execution of a synchronous operation in an asynchronous operational environment according to claim 4 , further comprising locking, by the processor, the active mutex for the execution thread for writing and unlocking the active mutex for the execution thread for reading at an initialization stage. 6. The method for execution of a synchronous operation in an asynchronous operational environment according to claim 1 , further comprising: receiving on the message channel from the execution thread to the communication thread data of the request; writing, by the processor, the data of the request into an active mutex of the communication thread; locking, by the processor, a passive mutex of the communication thread for reading and writing; unlocking, by the processor, the active mutex of the communication thread for writing; swapping, by the processor, the active mutex with the passive mutex of the communication thread; and outputting, by the processor, the data of the request to a shared resource. 7. The method for execution of a synchronous operation in an asynchronous operational environment according to claim 6 , further comprising locking, by the processor, the active mutex for the communication thread for reading and writing at an initialization stage. 8. A system, comprising: a processor; and a memory storing instructions executable by the processor to: receive a first operation from program code executing within an asynchronous operational environment, the program code being run on an execution thread and a communication thread provided within a virtual user module representing an instance of a virtual user, wherein the execution thread and the communication thread communicate through a message channel including a dual mutex and a communication line with the communication line being separate from the message channel; determine if the first operation is a synchronous operation; and if the first operation is a synchronous operation, send a request from the execution thread to the communication thread via the message channel and the dual mutex to perform the first operation and block execution of a subsequent operation by locking the dual mutex until a response to the request from the communication thread for the first operation has been completed and returned to the execution thread. 9. The system according to claim 8 , wherein the instructions are executable by the processor to further send a request from the execution thread to the communication thread via the communication line to perform the first operation and allowing execution of a subsequent operation, regardless if a request from the communication thread of the first operation has been completed, if the first operation is not a synchronous operation. 10. The system according to claim 8 , wherein the dual mutex includes an active mutex including a first data buffer and a passive mutex including a second data buffer, wherein the first data buffer and the second data buffer comprise a dual data buffer for the execution thread and the communication thread for the synchronous operation, and wherein the dual data buffer is always locked during the synchronous operation. 11. The system according to claim 8 , wherein the instructions are executable by the processor to further: receive on the message channel from the execution thread to the communication thread, data from the request; read the data from an active mutex of the execution thread; unlock the active mutex of the execution thread for writing; swap the active mutex with a passive mutex of the execution thread; lock the active mutex of the execution thread for writing; and unlock the active mutex of the execution thread for reading. 12. The system according to claim 11 , wherein the instructions are executable by the processor to lock the active mutex for the execution thread for writing and unlock the active mutex for the execution thread for reading at an initialization stage. 13. The system according to claim 8 , wherein the instructions are executable by the processor to further: receive on the message channel from the execution thread to the communication thread, data from the request; write the data into an active mutex of the communication thread; lock a passive mutex of the communication thread for reading and writing; unlock the active mutex of the communication thread for writing; swap the active mutex with the passive mutex of the communication thread; and output the data to a shared resource. 14. The system according to claim 13 , wherein the instructions are executable by the processor to further lock the active mutex for the communication thread for reading and writing at an initialization stage. 15. A non-transitory computer-readable data storage medium storing instructions executable by a processor to: receive a first o
Related publications grouped by family.
Answers are generated from the same data shown on this page.