Closed mookid8000 closed 4 years ago
Sorry this was auto-closed by Github a moment ago. I have restructed the repo to replace master and develop with release and incoming. I also commits https://github.com/mlockett42/litedb-async/pull/7/commits/0c945fe6ee1e9620297ea03ceb18bae7180a64a8 and https://github.com/mlockett42/litedb-async/pull/7/commits/9f69f77e96d7d6307a66419ef328d25db241eeae were cherry picked into the repo. I have an issue with the underlying database thing.
I hope github will correctly credit you for the commits in that situation see also https://github.com/mlockett42/litedb-async/issues/9
This obviates the need for the
_queueLock
, as the semaphore both acts as a lock and a "there's more work to do" signal.Use of
CancellationTokenSource
/CancellationToken
to signal thread exit seems more contemporary, AND it has the added benefit that the semaphore's wait can be interrupted by the cancellation token.To see if this change affected performance, I made the simple benchmark test (
SimpleBenchmark
). Here are the results of running the testBEFORE:
and AFTER:
Conclusion: Doesn't seem to have made any significant impact on performance.