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

    Class ThreadSafeCallback

    Thread-safe callback that can be invoked from any thread.

    Use this when native code may call the callback from a thread other than the main thread.

    Hierarchy (View Summary)

    Index
    pointer: bigint

    The callback function pointer, passable to native functions.

    • Return the function pointer, throwing if the callback has been released.

      Returns bigint

    • Release the callback and free native resources. Must be called when done.

      Returns void

    • Handler called with the error message when the JS function throws. Without a handler the error is reported with process.emitWarning.

      Parameters

      • handler: (message: string) => void

      Returns void

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

      Returns this

    • Do not keep the Node.js event loop alive.

      Returns this