Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llInstantMessage() built-in delay should not block

Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
08-13-2003 01:43
So my script llInstantMessage()s me, and because that has a built-in delay (to prevent spam or whatever), the entire script (including the control() event) freezes for five or more seconds.
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
08-13-2003 10:52
From: someone

Cory Linden:

Sleep blocks script execution and individual scripts are not multi-threaded, so during sleep the script doesn't do anything. This should be in the docs, but real quick here are the major delayed function calls:

llSetTexture
llScaleTexture
llOffsetTexture
llRotateTexture
llSetPos
llSetRot
(these all delay 0.2 seconds per function call)

llInstantMessage (10 seconds)
llEmail (20 seconds)

llSay doesn't currently add a delay.


I hope this helps a bit :)

-Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
08-18-2003 01:36
Not especially, since I already knew it was blocking, but thanks for digging that up.
Coyote Murphy
Beelphazoaric
Join date: 12 Aug 2003
Posts: 91
08-23-2003 10:40
I've been getting around this by having an auxiliary object execute the llEmail() function. Rather sloppy but it works; the object who I don't want to freeze up does a llSay(909090,"emailDataHere";) that the emailer object listens for, parses, and sends.

I eat, drink and breathe kludges.
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
08-23-2003 14:37
It's a very interesting workaround. I had thought of something like that myself once, when discussing with christopher omega a method for searching large sets of data more efficiently, I suggested that some sort of primitive multithreading could be achieved by having several objects search different parts of the data simultaneously.
Thus, I wouldnt call it a kludge, but rather a sound understanding of fundamental programming principles :D
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
08-23-2003 14:50
Oopsie... made a mistake, could LL delete this reply plz?
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm