feature: thread-it: get rid (#438)

This commit is contained in:
coderiaser 2025-07-02 18:34:59 +03:00
parent 99ad0c217d
commit 4ab4be124b
4 changed files with 2 additions and 10 deletions

View file

@ -140,7 +140,6 @@
"socket.io-client": "^4.0.1",
"squad": "^3.0.0",
"table": "^6.0.1",
"thread-it": "^3.0.0",
"try-catch": "^3.0.0",
"try-to-catch": "^3.0.0",
"tryrequire": "^3.0.0",

View file

@ -5,14 +5,12 @@ const {callbackify} = require('node:util');
const pullout = require('pullout');
const ponse = require('ponse');
const threadIt = require('thread-it');
const {read} = require('redzip');
const root = require('../root');
const isString = (a) => typeof a === 'string';
const parse = threadIt(join(__dirname, 'worker'));
const parse = require('./worker');
threadIt.init();
// warm up
parse('');

View file

@ -10,7 +10,6 @@ import {Server} from 'socket.io';
import tryRequire from 'tryrequire';
import wraptile from 'wraptile';
import compression from 'compression';
import threadIt from 'thread-it';
import exit from './exit.js';
import cloudcmd from './cloudcmd.mjs';
@ -20,7 +19,6 @@ const two = currify((f, a, b) => f(a, b));
const shutdown = wraptile(async (promises) => {
console.log('closing cloudcmd...');
await Promise.all(promises);
threadIt.terminate();
process.exit(0);
});

View file

@ -5,13 +5,10 @@ import {join} from 'node:path';
import montag from 'montag';
import tryToCatch from 'try-to-catch';
import currify from 'currify';
import threadIt from 'thread-it';
import {codeframe} from 'putout';
import {putout, codeframe} from 'putout';
const require = createRequire(import.meta.url);
const putout = threadIt(require.resolve('putout'));
threadIt.init();
// warm up worker cache
transpile('');