Async / buffering wrapper: Improve performance when blocking on NetCore#3416
Conversation
d29f47d to
9a19a71
Compare
9a19a71 to
d1757b9
Compare
Codecov Report
@@ Coverage Diff @@
## release/4.6.4 #3416 +/- ##
==============================================
- Coverage 80% 80% -<1%
==============================================
Files 358 358
Lines 28373 28378 +5
Branches 3785 3784 -1
==============================================
- Hits 22750 22740 -10
- Misses 4537 4543 +6
- Partials 1086 1095 +9 |
7b6a5a3 to
d59e833
Compare
d59e833 to
b5a01ed
Compare
b5a01ed to
c0f2c3f
Compare
|
Apparently hard to make a stable unit-test with multi-threading on the build-engines. One more try. |
48d12d4 to
721177a
Compare
|
Hrmm. Don't like how the NetCoreApp2 unit test have become very unstable. Need to be checked. |
6a9b524 to
995a478
Compare
|
Yes please check. Unstable tests are really slowing down development and releases. Maybe we should partly mock the unit test. |
|
It's probably now more an integration test, like most "unit tests" in NLog. |
d1d93b3 to
70062ce
Compare
|
Actually think it is a real bug, that has been revealed by the optimization of the dequeue-operation for the timer-thread. But right now the appveyor-build-queue has become very long, so it will have to look at it another day. |
70062ce to
3c4cddf
Compare
|
Maybe it's easier to run only on your appveyor account for this? Then you could stop/restart it yourself See https://github.com/NLog/NLog/blob/dev/howto-build-your-fork.md |
d23a6fe to
d9f2cc4
Compare
|
Think I have found the bug. After we have changed so blocking decrement/increments, then it means that timer-thread no longer automatically reschedules itself because it will not "see" producers by non-zero _count. It is important now that the producers that wake up will remember to start the consumer-timer-thread, if needed. Two producers that are blocked will get into This causes both producers to say that they don't need to start the consumer-timer-thread |
…ing mode (And unit test for deadlock issue)
d9f2cc4 to
7d65677
Compare
|
makes sense! Thanks for figuring out and fixing this! |
ConcurrentRequestQueue - Improved DequeueBatch performance when blocking
Avoid activating throttle logic, when timer-thread is able to keep up. The throttle logic also affects the timer-thread, so only perform throttle-logic when timer-thread is falling behind.
And unit test for deadlock issue