Using threads in NSA

Discussion created by keith_k on Oct 1, 2009
Latest reply on Dec 4, 2009 by shakeel.sorathia
I have been thinking about using threads in the NSA. The following warning appears in the whitepaper:
Please note that this inline code runs in a complete separate context, thus not able to access any data in the callers context.
The first argument to the thread() function is a string containing the code to be executed. I wanted the code to call another function from my script, but it was not working. Then I realized that functions are just normal variables in Lua, so the warning above applies to them as well as data variables.

Is there any way to work around this? The code I want to thread is fairly long and involved, so I do not think I can just create it as a string to hand to the thread() function. I think I may be out of luck if I insist on keeping my code in functions rather than a string.