iya-sts
    Preparing search index...
    Index
    • This thread's identity: the threadId in a worker thread, the pid in the main thread. Numeric, so it fits the sts_pool pin cookie as the pid did.

      Returns number

      the id

    • Whether this code runs in a request or surface worker THREAD — the one test every caller that used to ask process.send asks instead.

      Returns boolean

      true in a worker thread that has a parent port

    • Removes a listener on() installed.

      Parameters

      • installed: Listener

        what on() returned

      Returns void

    • Listens for messages from the front process, each revived (Buffers). The listener returned is the one to hand to off().

      Parameters

      • listener: Listener

        called with each message

      Returns Listener

      the installed listener, or null outside a worker thread

    • The pid, and the thread when this is not the main one: for what used the pid to tell processes apart (a claim holder, a per-process run key).

      Returns string

      pid or pid.threadId

    • Turns every Uint8Array that is not a Buffer, at any depth, back into a Buffer over the same memory. Arrays and plain objects are walked in place; anything else is returned as it is.

      Parameters

      • value: any

        a received message or part of one

      Returns any

      the value, revived

    • Sends a message to the front process. A no-op outside a worker thread, which is what a module loaded in the front or by a test wants.

      Parameters

      • message: any

        a structured-clonable value

      Returns boolean

      true when it was posted