Difference between revisions of "Creating Multithreaded Skyrim Mods"
Creating Multithreaded Skyrim Mods (edit)
Revision as of 11:05, 22 January 2015
, 11:05, 22 January 2015no edit summary
imported>Chesko |
imported>Chesko m |
||
Line 125: | Line 125: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
ObjectReference my_sword_future = ThreadManager.PlaceAtMeAsync(Sword) | ObjectReference my_sword_future = ThreadManager.PlaceAtMeAsync(Sword) | ||
ThreadManager.wait_all() | |||
</source> | </source> | ||
<code>PlaceAtMeAsync</code> is a function we've written that gets assigned to a thread. A thread that has been given data to work on is referred to as being '''queued'''. <code>wait_all()</code> tells the Thread Manager that it should start running any queued threads and that we will wait until they're finished. | |||
Later, when we decide we want the result of | Later, when we decide we want the result of our thread, we just ask for it: | ||