View Single Post
VoiDeD
AlliedModders Donor
Join Date: Mar 2009
Location: Illinois, USA
Old 03-23-2015 , 15:31   Re: Creating threads
Reply With Quote #4

The SP runtime is only ever expected to operate on the game's main thread.

You should not be calling into or out of SP from another thread unless you're serializing access between your threads, which can defeat the purpose of having a separate thread in the first place.

If you're doing some expensive operations that you want to move to another thread, a generic producer/consumer pattern is used where you can hook GameFrame to see if any of your queued jobs are completed/failed/etc.
__________________

Last edited by VoiDeD; 03-23-2015 at 15:31.
VoiDeD is offline