(max)
| 8 | |
| 9 | const commands = { |
| 10 | async square_sum(max) { |
| 11 | await new Promise((res) => setTimeout(res, 100)); |
| 12 | let sum = 0; for (let i = 0; i < max; i++) sum += Math.sqrt(i); |
| 13 | return sum; |
| 14 | } |
| 15 | }; |
| 16 | |
| 17 | parentPort.on('message', asyncOnMessageWrap(async ({ method, params, id }) => ({ |
nothing calls this directly
no outgoing calls
no test coverage detected