Skip to content

Commit 7fcd7a4

Browse files
committed
Add explanatory comment
1 parent 1afd1fb commit 7fcd7a4

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
@@ -250,6 +250,11 @@ namespace ts.server {
250250
private requestQueue: QueuedOperation[] = [];
251251
private requestMap = createMap<QueuedOperation>(); // Maps operation ID to newest requestQueue entry with that ID
252252

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

0 commit comments

Comments
 (0)