Inside a thread there is no possibility to use setTimeout.
I would vote for it. :-)
Doesn't that defeat the purpose of threads? Why don't you just sleep...
Depending on what you want, I might agree or disagree with this completely:
I don't see any situation in which the first one may be used, but it's a reasonable thing to do.
I really don't see the point of the second, as the nature of the threading model would make the thread either completely busy orcompletely free by the time the timeout fires. Either the task would be running, making it impossible to fire the callback, or the task would have been ended, thus making it more reasonable to fire it on the main thread.
If @zaphod1984 makes it clear exactly what (s)he wants and why, maybe the developers/contributors may discuss it.
actually i tried setTimeout simply to test a delayed response from a worker thread. i do not have an actual usecase.
These are defined in a native module, and I don't think there is a clean solution to implement them on tagg threads. See my long comment in #22.