Commit dba262d
committed
Fix ONNX shutdown crash: disable global thread pool via session options
Set intraOpNumThreads/interOpNumThreads: 1 on every ONNX session.
With these options onnxruntime-node uses per-session single threads
instead of the global thread pool. The global pool destructor has a
use-after-free mutex bug on macOS (libc++ 'Invalid argument' crash
during process exit). With no global pool created, the crash is gone.1 parent 70d502e commit dba262d
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
0 commit comments