Difference between revisions of "Creating Multithreaded Skyrim Mods Part 3 - Callbacks"
Creating Multithreaded Skyrim Mods Part 3 - Callbacks (edit)
Revision as of 17:14, 22 January 2015
, 17:14, 22 January 2015no edit summary
imported>Chesko |
imported>Chesko |
||
Line 371: | Line 371: | ||
* If you need to perform a set of actions that are not all the same, the Thread Manager might not be best for you. You may want to create different thread base scripts purpose-built for your various tasks and then call their get_async() functions directly, blocking on <code>queued()</code> until they're available. You can still run many different tasks concurrently this way, even if they're not the same. | * If you need to perform a set of actions that are not all the same, the Thread Manager might not be best for you. You may want to create different thread base scripts purpose-built for your various tasks and then call their get_async() functions directly, blocking on <code>queued()</code> until they're available. You can still run many different tasks concurrently this way, even if they're not the same. | ||
== Playing the Example Plugin == | == Playing the Example Plugin == | ||
Line 387: | Line 388: | ||
* '''20 Threads:''' Avg. 0.5 seconds to complete | * '''20 Threads:''' Avg. 0.5 seconds to complete | ||
Profiling your script is critical to determine if your unique application would benefit the most from more or less threads (or threading at all). | |||
Your experience and times may differ based on your current load order and system performance. Give it a try and see what results you obtain. | Your experience and times may differ based on your current load order and system performance. Give it a try and see what results you obtain. |