This function should probably load a script as it won't have access to any functions/variables from the previous context due to the way V8 works with threads. Threads/Workers should be passed a callback function which gets called when the worker ends or possibly whenever the user calls it.
This function should probably load a script as it won't have access to any functions/variables from the previous context due to the way V8 works with threads. Threads/Workers should be passed a callback function which gets called when the worker ends or possibly whenever the user calls it.
Look into how workers work in the browser