Skip to content

High CPU Usage / .net 6 / linux #1241

Closed Answered by bording
Stan92 asked this question in Q&A
Discussion options

You must be logged in to vote

while (!stoppingToken.IsCancellationRequested);

Checking the value of IsCancellationRequested is not a blocking call, so that loop is spinning endlessly and consuming all your cpu resources.

Why are you trying to keep that method alive? What you are doing there is not going to work.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Stan92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants