I think Lua coroutines can be used to achieve what you are asking. If you really need to use proper threads then sure, dmThread could be used. There is an old example made by a forum member here: Experimental Threading extension - #12 by kiprono
I’m not sure if the extension is still working, but it could probably be made to work. Note that thread safety need to be adressed.
Yes, that is not a problem. Here’s an example where I load a 24MB JSON, parse it to a Lua table and print some of the values: