GameMonkey Script

GameMonkey Script Forums
It is currently Wed Jan 23, 2019 2:36 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 
Offline

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

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.

Code:
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 );


Cheers,
Seth

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


Attachments:
gmThreadEx.h [5.15 KiB]
Downloaded 374 times
Top
 Profile  
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 2 guests


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:  
cron
Powered by phpBB® Forum Software © phpBB Group