Skip to content

Commit 4ab4be1

Browse files
committed
feature: thread-it: get rid (#438)
1 parent 99ad0c2 commit 4ab4be1

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@
140140
"socket.io-client": "^4.0.1",
141141
"squad": "^3.0.0",
142142
"table": "^6.0.1",
143-
"thread-it": "^3.0.0",
144143
"try-catch": "^3.0.0",
145144
"try-to-catch": "^3.0.0",
146145
"tryrequire": "^3.0.0",

server/markdown/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ const {callbackify} = require('node:util');
55

66
const pullout = require('pullout');
77
const ponse = require('ponse');
8-
const threadIt = require('thread-it');
98
const {read} = require('redzip');
109

1110
const root = require('../root');
1211
const isString = (a) => typeof a === 'string';
13-
const parse = threadIt(join(__dirname, 'worker'));
12+
const parse = require('./worker');
1413

15-
threadIt.init();
1614
// warm up
1715
parse('');
1816

server/server.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {Server} from 'socket.io';
1010
import tryRequire from 'tryrequire';
1111
import wraptile from 'wraptile';
1212
import compression from 'compression';
13-
import threadIt from 'thread-it';
1413
import exit from './exit.js';
1514
import cloudcmd from './cloudcmd.mjs';
1615

@@ -20,7 +19,6 @@ const two = currify((f, a, b) => f(a, b));
2019
const shutdown = wraptile(async (promises) => {
2120
console.log('closing cloudcmd...');
2221
await Promise.all(promises);
23-
threadIt.terminate();
2422
process.exit(0);
2523
});
2624

server/user-menu.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ import {join} from 'node:path';
55
import montag from 'montag';
66
import tryToCatch from 'try-to-catch';
77
import currify from 'currify';
8-
import threadIt from 'thread-it';
9-
import {codeframe} from 'putout';
8+
import {putout, codeframe} from 'putout';
109

1110
const require = createRequire(import.meta.url);
12-
const putout = threadIt(require.resolve('putout'));
1311

14-
threadIt.init();
1512
// warm up worker cache
1613
transpile('');
1714

0 commit comments

Comments
 (0)