Function killThreads

  • Terminates all Emscripten worker threads spawned by Z3.

    Long-running Z3 operations (such as solver.check()) run on background worker threads. In Node.js these workers keep the process alive even after Z3 has finished. Call this function once you are done using Z3 to allow the Node.js process to exit cleanly.

    import { init, killThreads } from 'z3-solver';

    const api = await init();
    // ... use Z3 ...
    await killThreads(api.em);

    Parameters

    • em: any

    Returns Promise<void>