=proto void duk_push_current_thread(duk_context *ctx); =stack [ ... ] -> [ ... thread! ] =summary

Push the currently running Duktape thread to the stack. The value pushed is a thread object which is also an Ecmascript object. If there is no current thread, undefined is pushed instead.

The current thread is (almost always) the thread represented by the ctx pointer.

To get the duk_context * associated with the thread, use duk_get_context().

=example duk_push_thread(ctx); =tags stack function