Last change
on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
365 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | import Piscina from '..';
|
---|
| 2 | import { test } from 'tap';
|
---|
| 3 | import { resolve } from 'path';
|
---|
| 4 |
|
---|
| 5 | test('can destroy pool while tasks are running', async ({ rejects }) => {
|
---|
| 6 | const pool = new Piscina({
|
---|
| 7 | filename: resolve(__dirname, 'fixtures/eval.js')
|
---|
| 8 | });
|
---|
| 9 | setImmediate(() => pool.destroy());
|
---|
| 10 | await rejects(pool.runTask('while(1){}'), /Terminating worker thread/);
|
---|
| 11 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.