MCPcopy Index your code
hub / github.com/andywer/threads.js / events

Function events

src/master/thread.ts:18–20  ·  view source on GitHub ↗

Return an observable that can be used to subscribe to internal events happening in the thread. Useful for debugging.

(thread: ThreadT)

Source from the content-addressed store, hash-verified

16 },
17 /** Return an observable that can be used to subscribe to internal events happening in the thread. Useful for debugging. */
18 events<ThreadT extends ThreadType>(thread: ThreadT): Observable<WorkerEvent> {
19 return thread[$events] || fail("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")
20 },
21 /** Terminate a thread. Remember to terminate every thread when you are done using it. */
22 terminate<ThreadT extends ThreadType>(thread: ThreadT) {
23 return thread[$terminate]()

Callers

nothing calls this directly

Calls 1

failFunction · 0.70

Tested by

no test coverage detected