Methods for transparent management of context and state in an asynchronous callback flow
First Claim
1. A computerized method for providing at least one memory value present in computer memory during execution of a program procedure to be automatically available to an asynchronous callback procedure executed later, comprising:
- receiving a code containing at least one program procedure, said at least one program procedure having at least one input parameter to be executed as an asynchronous callback procedure;
replacing said at least one program procedure in said code with at least one wrapper procedure, where each of said at least one wrapper procedure comprises instructions for;
storing at least one memory value available to said asynchronous callback procedure prior to execution of said asynchronous callback procedure;
storing said asynchronous callback procedure of said at least one input parameter;
replacing each of said at least one input parameter with a wrapper callback procedure, said wrapper callback procedure comprising instructions for restoring said at least one memory value and then executing said asynchronous callback procedure; and
executing said at least one program procedure;
executing said code with said at least one wrapper procedure, providing said at least one memory value present during execution of said program procedure to be automatically available to said asynchronous callback procedure executed later,wherein execution of said asynchronous callback procedure initiates execution of at least one additional callback procedure, and each of said at least one additional callback procedure is performed by execution of corresponding said wrapper callback procedure which restores said at least one memory value prior to execution of said at least one additional callback procedure.
1 Assignment
0 Petitions
Accused Products
Abstract
Computerized methods for providing one or more memory values present in memory during execution of a procedure to be automatically available to an asynchronous callback executed later. The methods comprise receiving a code containing procedures, the procedures having input parameters to be executed as asynchronous callback procedures. The methods further comprise replacing the procedures in the code with wrapper procedures, where the wrapper procedures comprise instructions for storing one or more memory values, storing the asynchronous callbacks of the input parameters, replacing each of the input parameters with a wrapper callback, the wrapper callback comprising instruction for restoring the memory values and executing the asynchronous callbacks. The methods further comprise executing the original procedures. The methods further comprise executing the code with the wrapper procedures, providing the memory values present during execution of the procedure to be automatically available to the asynchronous callback executed later.
20 Citations
18 Claims
-
1. A computerized method for providing at least one memory value present in computer memory during execution of a program procedure to be automatically available to an asynchronous callback procedure executed later, comprising:
-
receiving a code containing at least one program procedure, said at least one program procedure having at least one input parameter to be executed as an asynchronous callback procedure; replacing said at least one program procedure in said code with at least one wrapper procedure, where each of said at least one wrapper procedure comprises instructions for; storing at least one memory value available to said asynchronous callback procedure prior to execution of said asynchronous callback procedure; storing said asynchronous callback procedure of said at least one input parameter; replacing each of said at least one input parameter with a wrapper callback procedure, said wrapper callback procedure comprising instructions for restoring said at least one memory value and then executing said asynchronous callback procedure; and executing said at least one program procedure; executing said code with said at least one wrapper procedure, providing said at least one memory value present during execution of said program procedure to be automatically available to said asynchronous callback procedure executed later, wherein execution of said asynchronous callback procedure initiates execution of at least one additional callback procedure, and each of said at least one additional callback procedure is performed by execution of corresponding said wrapper callback procedure which restores said at least one memory value prior to execution of said at least one additional callback procedure. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer program product, comprising a non-transitory computer usable memory having a computer readable program code embodied therein, said computer readable program code containing processor instructions to implement a method for providing at least one memory value present in computer memory during execution of a program procedure to be automatically available to an asynchronous callback procedure executed later, comprising instructions for:
-
receiving a code containing at least one program procedure, said at least one program procedure having at least one input parameter to be executed as an asynchronous callback procedure; replacing said at least one program procedure in said code with at least one wrapper procedure, where each of said at least one wrapper procedure comprises instructions for; storing at least one memory value available to said asynchronous callback procedure prior to execution of said asynchronous callback procedure; storing said asynchronous callback procedure of said at least one input parameter; replacing each of said at least one input parameter with a wrapper callback procedure, said wrapper callback procedure comprising instructions for restoring said at least one memory value and then executing said asynchronous callback procedure; and executing said at least one program procedure; executing said code with said at least one wrapper procedure, providing said at least one memory value present during execution of said program procedure to be automatically available to said asynchronous callback procedure executed later, wherein execution of said asynchronous callback procedure initiates execution of at least one additional callback procedure, and each of said at least one additional callback procedure is executed by corresponding said wrapper callback procedure which restores said at least one memory value prior to execution of said at least one additional callback procedure. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
-
16. A computerized device for providing at least one memory value present in computer memory of the computerized device during execution of a program procedure to be automatically available to an asynchronous callback procedure executed later, comprising:
-
at least one hardware processor configured for executing the following code instructions; first code instructions for receiving a code containing at least one program procedure, said at least one program procedure having at least one input parameter to be executed as an asynchronous callback procedure; second code instructions for replacing said at least one program procedure in said code with at least one wrapper procedure, where each of said at least one wrapper procedure comprises code instructions for; storing at least one memory value available to said asynchronous callback procedure prior to execution of said asynchronous callback procedure; storing said asynchronous callback procedure of said at least one input parameter; replacing each of said at least one input parameter with a wrapper callback procedure, said wrapper callback procedure comprising instructions for restoring said at least one memory value and then executing said asynchronous callback procedure; and executing said at least one program procedure; third code instructions for executing said code with said at least one wrapper procedure, providing said at least one memory value present during execution of said program procedure to be automatically available to said asynchronous callback procedure executed later, wherein execution of said asynchronous callback procedure initiates execution of at least one additional callback procedure, and each of said at least one additional callback procedure is executed by corresponding said wrapper callback procedure which restores said at least one memory value prior to execution of said at least one additional callback procedure. - View Dependent Claims (17, 18)
-
Specification