GameMonkey Script

GameMonkey Script Forums
It is currently Fri May 24, 2019 7:50 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: threadEx
PostPosted: Wed Feb 07, 2007 8:23 pm 

Joined: Mon Jun 26, 2006 3:48 pm
Posts: 114
Location: Paris, France

This function was supposed to be available with the next update to gmMachineEx but I release it now alone (it will still be available directly with the gmMachineEx) in case someone needs it.

threadEx works like the "original" thread function with extra parameters. If you type AT_CREATE, the new thread will be launched after the creation of the thread. AT_DESTROY will launch it after it's destruction. Finally, AT_TIME will launch it after X seconds.

Test = function()
print( "In test" );

Foo = function()
print( "In Foo" );

threadEx( Foo, Params, AT_CREATE, Test );
threadEx( Foo, Params, AT_DESTROY, Test );
threadEx( Foo, Params, AT_TIME, 2 );

thread( Test );


Note: I didn't try it after "extracting" it from the gmMachineEx so maybe it will need some changes.

gmThreadEx.h [5.15 KiB]
Downloaded 395 times
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group