name: duk_push_thread_stash proto: | void duk_push_thread_stash(duk_context *ctx, duk_context *target_ctx); stack: | [ ... ] -> [ ... stash! ] summary: |

Push the stash object related to target_ctx to the stack (the ctx and target_ctx arguments may refer to the same thread). The thread stash is an internal object which can be used to store key/value pairs from C code so that they are reachable for garbage collection, but are not accessible from Ecmascript code. The stash is only accessible from C code with a matching target_ctx argument.

If target_ctx is NULL, throws an error.

example: | duk_push_thread_stash(ctx, ctx2); tags: - stack - stash - object - module - thread - sandbox seealso: - duk_push_heap_stash - duk_push_global_stash introduced: 1.0.0