node-ctypes - v2.10.0
    Preparing search index...

    Interface ThreadSafeCallbackWrapper

    Wrapper returned by threadSafeCallback.

    interface ThreadSafeCallbackWrapper {
        pointer: bigint;
        _as_parameter_: bigint;
        release(): void;
        "[dispose]"(): void;
        _callback: ThreadSafeCallback;
        ref(): this;
        unref(): this;
        setNativeError(error: bigint): void;
        drain(): number;
    }

    Hierarchy (View Summary)

    Index
    pointer: bigint

    The callback function pointer, passable to native functions.

    _as_parameter_: bigint

    Same as pointer: lets the callback be passed directly as an argument.

    • Keep the Node.js event loop alive until released (the default).

      Returns this

    • Do not keep the Node.js event loop alive: the process can exit while the callback exists. Calls from other threads are delivered while it runs.

      Returns this

    • Transfer a nonzero opaque error pointer to nativeContext.onError on the original caller thread, after resume. Only during this callback; once per invocation. The callback must also return its ABI's error sentinel. Ownership transfers to onError, which must consume the pointer.

      Parameters

      • error: bigint

      Returns void

    • Execute a snapshot of queued calls on the owning Node thread; return the number claimed.

      Returns number