Patent ID: 8782644
Filing Date: 2014-07-15
Classification: G06F

Abstract:
1. A computer-implemented method for facilitating the development and execution of a software program, comprising: providing a mechanism for restricting a variable to a runtime context in the software program; during execution of the software program: using the mechanism to prevent incorrect execution of the software program, wherein preventing the incorrect execution comprises ensuring that the runtime context for the subsequent execution corresponds to the runtime context that is used to create the closure by: performing a comparison of the first context identifier to the second context identifier; when the comparison indicates that the first context identifier corresponds to the second context identifier, allowing the runtime context for the subsequent execution to perform the subsequent execution of the closure; and when the comparison indicates that the first context identifier does not correspond to the second context identifier, preventing the subsequent execution of the closure within the runtime context for the subsequent execution; wherein the first context identifier identifies a thread that is used to create the closure that captures the variable; wherein the second context identifier identifies a thread assigned to perform the subsequent execution of the closure; and wherein preventing the subsequent execution of the closure within the runtime context for the subsequent execution comprises merging the thread that is used to create the closure and the thread assigned to perform the subsequent execution into a single thread.