Skip to content

Commit 9692ce8

Browse files
committed
Add explanatory comment
1 parent 0b1bad8 commit 9692ce8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/server/server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@ namespace ts.server {
251251
private requestQueue: QueuedOperation[] = [];
252252
private requestMap = createMap<QueuedOperation>(); // Maps operation ID to newest requestQueue entry with that ID
253253

254+
// This number is essentially arbitrary. Processing more than one typings request
255+
// at a time makes sense, but having too many in the pipe results in a hang
256+
// (see https://github.com/nodejs/node/issues/7657).
257+
// It would be preferable to base our limit on the amount of space left in the
258+
// buffer, but we have yet to find a way to retrieve that value.
254259
private static readonly maxActiveRequestCount = 10;
255260
private static readonly requestDelayMillis = 100;
256261

0 commit comments

Comments
 (0)