Skip to content

Commit

Permalink
sleep 16ms when using synchronous io on windows for reducing cpu usage
Browse files Browse the repository at this point in the history
  • Loading branch information
bung87 committed Jan 6, 2024
1 parent bf04701 commit f3cdce0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/nimlsp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,8 @@ proc main(ins: Stream | AsyncFile, outs: Stream | AsyncFile) {.multisync.} =
except CatchableError as e:
warnLog "Got exception: ", e.msg
continue
when defined(windows):
sleep(16)

when defined(windows):
var
Expand Down

0 comments on commit f3cdce0

Please sign in to comment.