These forums are CLOSED. Please visit the new forums HERE
Threading |
|
|
DeepFried Chickenwing
Registered User
Join date: 8 Feb 2006
Posts: 1
|
03-04-2006 01:09
I understand the concept behind threading, and what its uses are. But how is it actually done? Can anyone give me a little piece of code that demonstrates threading?
|
|
Greg Hauptmann
Registered User
Join date: 30 Oct 2005
Posts: 283
|
03-04-2006 01:30
I didn't think there were any thread commands in LSL, and that within a script only one thing is executing at once (i.e. timer events, listen events queue up and occur one by one)
but I guess you can obtain the effect of creating a new thread by sending a link message to a different script to start a separate action in this script (e.g. to send an email from a different script) - refer to an example in the wiki at http://secondlife.com/badgeo/wakka.php?wakka=ExampleLinkMessage is this what you meant? |
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
03-04-2006 09:40
Yes, I think that's what he meant. You can use this pseudo-threading for llInstantMessage and llEmail to avoid delaying the main script-- send the commands to a slave script to take the delays. With multiple slaves, the delay becomes unimportant.
_____________________
|
|
Greg Hauptmann
Registered User
Join date: 30 Oct 2005
Posts: 283
|
03-04-2006 14:00
I do this for sensing multiple objects in parrellel too (sensor)
|