Is this a single CPU? Cause otherwise this would mean threadding is very inefficient here - it should spread the threads accross the cpus...
Or is it showing the summed up work of all CPUs on your CPU monitor?
Posting this for my sake and anyone else who comes looking for this:
When passing arguments to Thread:start() you can use the following to capture multiple args into a table for later use. I found this to be useful for passing a varying number of arguments to start().
-- thread.lua
-- ### gather args
local args = {}
local x = 1
while true do
local o = select(x, ...)
if o == nil then
break
end
table.insert(args, o)
x = x + 1
end
Then in your main.lua script you might have something like this:
Very true. That being said, in my recent searches I wasn't able to find much else about threads and this post is still linked on the wiki page for threads.
I'd also like to point out you could replace your entire first snippet with 'local args = {...}'.
That certainly makes things a lot simpler, thanks! I've only been working with Lua/LOVE for about a month now so I'm still learning the tricks of the trade.