You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
607 B

=proto
void duk_push_current_thread(duk_context *ctx);
=stack
[ ... ] -> [ ... thread! ]
=summary
<p>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, <code>undefined</code> is pushed instead.</p>
<p>The current thread is (almost always) the thread represented by the
<code>ctx</code> pointer.</p>
<p>To get the <code>duk_context *</code> associated with the thread, use
<code><a href="#duk_get_context">duk_get_context()</a></code>.</p>
=example
duk_push_thread(ctx);
=tags
stack
function