Commit 7d2598f
committed
Synchronize access to the Prism instance
WASM is inherently single-threaded, so we cannot allow multiple
threads to be parsing with a single chicory-prism instance at the
same time. For now, we synchronize that access. A pool of instances
or a soft thread-local could be used in the future if that becomes
a bottleneck.1 parent bc1a9b5 commit 7d2598f
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
0 commit comments