Commit Graph

10 Commits

Author SHA1 Message Date
SomaticFanatic 5ef0607da6 Update copyright year to 2020
Update copyright year to 2020
2020-05-06 22:36:54 -04:00
moneromooo-monero 27522aaa12
core_tests: reset thread pool between tests
Avoids a DB error (leading to an assert) where a thread uses
a read txn previously created with an environment that was
since closed and reopened. While this usually works since
BlockchainLMDB renews txns if it detects the environment has
changed, this will not work if objects end up being allocated
at the same address as the previous instance, leading to stale
data usage.

Thanks hyc for the LMDB debugging.
2019-11-10 12:58:49 +00:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
moneromooo-monero 2771a18e85
threadpool: allow leaf functions to run concurrently
Decrease the number of worker threads by one to account
for the fact the calling thread acts as a worker thread now
2018-06-26 22:15:22 +01:00
moneromooo-monero db55263b4c
threadpool: allow constructing an object, and misc tweaks
use unsigned int to avoid having to range check negative numbers,
use const where possible, don't needlessly create empty objects,
use std::move where possible
2018-05-20 12:06:03 +01:00
moneromooo-monero 9b98a6ac8f
threadpool: catch exceptions in dtor, to avoid terminate
If an exception is thrown, it is ignored. While this may hide
a bug, this should only be system exceptions in boost, which
is pretty unlikely. Morever, wait should be called manually
before the dtor anyway. Add an error message if the dtor has
to wait in case some such cases creep in so they get fixed.

Coverity 182538
2018-02-02 16:27:39 +00:00
xmr-eric 84a7f6a482 Readd copyright starting date 2018-01-26 10:03:20 -05:00
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
Howard Chu 6d0ca7d11f
Tweak concurrency limits
Create capacity for 2x max, but lie about it
2017-09-15 00:28:48 +01:00
Howard Chu 510d0d4753
Use a threadpool
Instead of constantly creating and destroying threads
2017-09-14 21:42:48 +01:00