[thread_var_push] creates a variables that is shared and accessible outside of any particular method call, yet is restricted to the currently executing thread. In addition, subsequent calls to [thread_var_push], with the same variable name, will create a variable "stack".
thread_var_push( ::varName, #obj );
The thread variable ::myVar is accessible within myMethod. Normally, a local variable would not be.
Code
define myMethod( ) => {
return thread_var_get( ::myVar );
} // Close myMethod
thread_var_push( ::myVar, 'This is my thread var.' ); // Create thread var
myMethod( ); // Call myMethod
Result
This is my thread var.
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments