AMBIENT STATE FOR ASYNCHRONOUS METHODS
First Claim
1. A method to provide asynchronous programming support for an asynchronous method, the method comprising:
- capturing a method stack current frame of an asynchronous method stack frame;
instantiating a new frame by setting a previous reference of the new frame to the current frame and setting the new frame to be a current reference and moving data from the previous frame into the current frame;
moving a state machine associated with the asynchronous method from a current state to a next state; and
restoring the captured frame.
2 Assignments
0 Petitions
Accused Products
Abstract
A method of providing asynchronous programming support at run time for scope-based ambient state at a method call is disclosed. In response to the method call, an asynchronous method stack frame is created along with ambient state for the asynchronous method call. In one example of the method, a current frame of a method stack is captured. A new frame is instantiated by setting a previous reference of the new frame to the current frame and moving data from the previous frame into the current frame. One example of instantiating the new frame includes pushing the current frame onto the stack. In another example, the new frame is lazily created when changes have been made. A state machine used to transform the synchronously-created method into an asynchronous method is moved from a current state to a next state. The captured frame is restored.
5 Citations
20 Claims
-
1. A method to provide asynchronous programming support for an asynchronous method, the method comprising:
-
capturing a method stack current frame of an asynchronous method stack frame; instantiating a new frame by setting a previous reference of the new frame to the current frame and setting the new frame to be a current reference and moving data from the previous frame into the current frame; moving a state machine associated with the asynchronous method from a current state to a next state; and restoring the captured frame. - View Dependent Claims (2, 3, 4, 5, 6, 9, 10)
-
- 7. The method of claim 7 wherein ambient state of the asynchronous method persists at suspension and resumption points in the asynchronous method.
-
11. A method to provide asynchronous programming support for scope-based ambient state at an asynchronous method call, the method comprising:
-
creating an asynchronous method stack frame; capturing a current frame of the asynchronous method stack frame; instantiating a new frame by setting a previous reference of the new frame to the current frame and moving data from the previous frame into the current frame; moving a state machine associated with the asynchronous method call from a current state and a next state; and restoring the captured frame. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18)
-
-
19. A method at runtime of a process to provide asynchronous programming support for scope-based ambient state at an asynchronous method call, the method comprising:
-
creating an asynchronous method stack frame in response to the method call; creating an ambient state for the asynchronous method call; capturing a current method stack frame of the asynchronous method stack frame by pushing the current method stack frame onto a stack; instantiating a new frame by setting a previous frame to the current frame and copying data from the previous frame into the current frame; moving a state machine associated with the method call from a current state to a next state; and restoring the captured method stack frame by popping the current method stack frame from the stack. - View Dependent Claims (20)
-
Specification