-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asyncdispatch.poll() eats cpu; poll is not blocking #6929
Comments
Proves we need to move to proper timers :) |
All latest changes to |
After some investigation, i have found that this bug is regression, made by somebody who introduced this branch (https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L1234). @enthus1ast, remove this line, and everything will be fine. @dom96, while trying to fix this #4262 via 5bf1643, you have introduced this one. |
Are you sure this is a regression? This line was always in there: https://github.com/nim-lang/Nim/blame/000b8afd26fa16684a116d9afe798ea94df9c270/lib/upcoming/asyncdispatch.nim#L1222 |
this is the output of the above test with .
.
in foo
.
.
.
.
.
.
.
in foo
.
.
in foo
.
.
in foo
.
.
.
.
.
.
.
.
.
.
.
in foo
.
.
in foo
. |
@enthus1ast, looks like work as expected, isn't it? |
@cheatfate it works! (i just have no clue how asyncdispatch works inside, i guess...) |
You were right all along @cheatfate :) I decided to finally investigate how to fix #7758/#7886 and ended up doing exactly what you suggest here. I can't reproduce #4262 anymore though. |
results in 100% cpu load on one core. Tested on linux
edit: fixed typo
The text was updated successfully, but these errors were encountered: