Skip to content

Commit 02e1925

Browse files
committed
Dont start worker in sync mode closes #642
1 parent 48e6754 commit 02e1925

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

dist/worker/parent.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ if (debug_1.debugSync) {
1616
parent.sendToIpcOnlyLast = function (x) { return x; };
1717
}
1818
function startWorker() {
19-
parent.startWorker(__dirname + '/child.js', showError, atomConfig.typescriptServices ? [atomConfig.typescriptServices] : []);
19+
if (!debug_1.debugSync) {
20+
parent.startWorker(__dirname + '/child.js', showError, atomConfig.typescriptServices ? [atomConfig.typescriptServices] : []);
21+
}
2022
}
2123
exports.startWorker = startWorker;
2224
function stopWorker() {
23-
parent.stopWorker();
25+
if (!debug_1.debugSync) {
26+
parent.stopWorker();
27+
}
2428
}
2529
exports.stopWorker = stopWorker;
2630
function showError(error) {

lib/worker/parent.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ if (debugSync) {
2424
}
2525

2626
export function startWorker() {
27-
parent.startWorker(__dirname + '/child.js', showError, atomConfig.typescriptServices ? [atomConfig.typescriptServices] : []);
27+
if (!debugSync) {
28+
parent.startWorker(__dirname + '/child.js', showError, atomConfig.typescriptServices ? [atomConfig.typescriptServices] : []);
29+
}
2830
}
2931

3032
export function stopWorker() {
31-
parent.stopWorker();
33+
if (!debugSync) {
34+
parent.stopWorker();
35+
}
3236
}
3337

3438
function showError(error: Error) {

0 commit comments

Comments
 (0)