ID:167320
Mar 28 2006, 4:46 pm
|
|
I dont know if this is the right place to ask, but what is the difference between the spawn and sleep procs?
|
In response to Loduwijk
|
|
thanks
|
That outputs "Let's wait a bit." then a second later it outputs "...a second later", obviously.
That example does not wait.
When you use spawn, you give it its own code block and it waits to execute that block and that block only, nothing else.
spawn also ignores the call stack (except for the function that immediately preceeds it) which it was called from, allowing you to have an infinite recursion without crashing.