|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
|
|