Commit | Line | Data |
---|---|---|
d35e5717 | 1 | import { KillBehaviors, ThreadWorker } from '../../../lib/index.cjs' |
b2fd3f4a | 2 | import { |
70a4f5ea | 3 | factorial, |
b2fd3f4a JB |
4 | fibonacci, |
5 | jsonIntegerSerialization | |
d35e5717 | 6 | } from '../../test-utils.cjs' |
70a4f5ea | 7 | |
b2fd3f4a | 8 | export default new ThreadWorker( |
70a4f5ea | 9 | { |
041dc05b JB |
10 | jsonIntegerSerialization: data => jsonIntegerSerialization(data.n), |
11 | factorial: data => factorial(data.n), | |
12 | fibonacci: data => fibonacci(data.n) | |
70a4f5ea JB |
13 | }, |
14 | { | |
cca3bb1a JB |
15 | killBehavior: KillBehaviors.HARD, |
16 | maxInactiveTime: 500 | |
70a4f5ea JB |
17 | } |
18 | ) |