Skip to content


Subversion checkout URL

You can clone with
Download ZIP


setTimeout #17

seriousManual opened this Issue · 5 comments

6 participants


Inside a thread there is no possibility to use setTimeout.


I would vote for it. :-)

hf commented

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:

  • Executing a callback on the main thread after a while, registering it on a different thread: OK
  • Executing a callback on the same thread that called setTimeout after a while: BAD

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.

@xk xk reopened this

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.