multithreaded lua api request

multithreaded lua api request

Requests for features in the spring code.

Moderator: Moderators

Post Reply
bishop181
Posts: 4
Joined: 12 Jun 2010, 03:30

multithreaded lua api request

Post by bishop181 »

I'd like to request an api for writing multi-threaded lua code (coroutines are not genuinely multi-threaded, ie use multiple processors simultaneously). with a mt version of spring, I think this is a resemble request, and it is easy to add mt api to standard lua (though I appreciate the reasons for not allowing you do do this in spring).

thanks.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: multithreaded lua api request

Post by aegis »

why?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: multithreaded lua api request

Post by Argh »

So that he can write multithreaded Lua applications using the engine?

So that we can make our code multithread aware, and deliberately ask for a processor with less load to handle the code?

I think it'd be grand if we could put a simple request in via Lua where we requested the processor with the least load, instead of the current assumption that we are running all gamecode via processor 1, and all OpenGL via processor 2...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: multithreaded lua api request

Post by Argh »

So, we basically need that + writing the Lua to be Lanes-aware + a Lua command to Spring that requests the number of processors and their current load.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: multithreaded lua api request

Post by aegis »

no. just lanes. processor load changes so quickly it's better to let the system decide where to run code (with the exception of the smp seesaw method)

and you might only be able to call spring's lua functions from the main lua thread.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: multithreaded lua api request

Post by Argh »

That makes sense.
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: multithreaded lua api request

Post by Master-Athmos »

Thanks for the link...
Post Reply

Return to “Feature Requests”