[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
GameMonkey Script • View topic - endon

GameMonkey Script

GameMonkey Script Forums
It is currently Sun Oct 24, 2021 2:17 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: endon
PostPosted: Tue May 05, 2009 6:27 pm 
Offline

Joined: Thu Jan 01, 2004 4:31 pm
Posts: 307


Top
 Profile  
Reply with quote  
 Post subject: Re: endon
PostPosted: Tue May 05, 2009 6:44 pm 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439
definately would be useful, I can think of a number of places I would use it in my bot scripting


Top
 Profile  
Reply with quote  
 Post subject: Re: endon
PostPosted: Tue May 05, 2009 10:31 pm 
Offline

Joined: Thu Jan 01, 2004 4:31 pm
Posts: 307
Cool. I've attached a patch for 1.25n which (I think) will implement this in a decent way. Let me know how this works out...


Attachments:
gm_1_25n_endon.rar [26.56 KiB]
Downloaded 427 times
gmsrc_1_25n_endon.txt [5.06 KiB]
Downloaded 409 times
Top
 Profile  
Reply with quote  
 Post subject: Re: endon
PostPosted: Wed May 06, 2009 5:08 am 
Offline

Joined: Mon Dec 15, 2003 1:38 pm
Posts: 708
I like it. I've added these changes to my build, enabled with #define in v1.25o.

Edit: It appears that the killed thread is not being killed correctly. gmThread::Sys_SetState() is likely inadequate for a kill. gmMachine::Sys_SwitchState() would normally be required however this will likely interfere with iteration within the blocked/running lists. I will have to investigate further.

Edit2: Investigating a little further it appears it is safe to change Sys_SetState to Sys_SwitchState as there are no conflicts with list iterators, however I have not tested all code paths. There is another issue however, if the thread is blocked and then signaled with both unblocking and ending signals directly after each other, the ending signal is not carried out due to the thread's pending status.

Edit3: I think I've fixed it apart from testing a code path that may never occur. Changes made to gmMachine::Signal(). Uploaded v1.25p.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

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