Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Nov 10, 2007 10:51 pm   

Idea[2.11]: #MAKETHREAD
 
Or some such similar name. The parameters would be a script portion or alias and an optional name. That script portion would be tossed off into another thread and #MAKETHREAD would return immediately. The created thread would flagged as running, but wouldn't be executed until forced to by a switch or its turn came up normally. This would leave it the responsibility of the created thread to stop itself with #WAITFOR or #WAITSIGNAL if so desired.

Examples:
#ALIAS alias {#WAITSIGNAL startAlias;#ADD didAlias 1}
#MAKETHREAD alias HoldAlias

#MAKETHREAD {#WAITSIGNAL startAlias;#ADD didAlias 1}

#MAKETHREAD {#SHOW second line}
#SHOW first line
Displays:
first line
second line
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sun Nov 11, 2007 5:09 am   
 
Actually, the #THREAD command does this already:

#THREAD Name {commands to run in the background}

This will spawn a new thread to execute the commands, and then will continue immediately with the rest of the current script. Yeah, I need to document more, sorry.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Nov 11, 2007 2:40 pm   
 
I see it now. The quick reference for #THREAD shows it but the help doesn't. I will update that.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net