Threads and Existing Code

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Goober
Prole
Posts: 6
Joined: Wed Mar 11, 2015 9:28 pm

Threads and Existing Code

Post by Goober »

Is there a way to run existing functions inside of a thread, or do you need to supply a separate file? I have a bunch of functions I'd like to use in general, but also want to call inside of a thread.

[Edit]: After some research, I'd like to revise my question: is there a way to copy the current state of the game into another thread? Essentially I just want to copy over _G, since it has all of the information and functions I want to process in the thread, but Thread:push() doesn't support non-flat tables for some reason.

[Edit 2]: I'm trying pickling the information I need, then unpickling it on the other side. I can't seem to use require though in my thread. It always says the module can't be found.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 59 guests