summaryrefslogtreecommitdiff
path: root/src/common/threadpool.h
Commit message (Collapse)AuthorAgeFilesLines
* threadpool: guard against exceptions in jobs, and armour platingmoneromooo-monero2020-09-011-2/+6
| | | | | Those would, if uncaught, exit run and leave the waiter to wait indefinitely for the number of active jobs to reach 0
* Update copyright year to 2020SomaticFanatic2020-05-061-1/+1
| | | | Update copyright year to 2020
* core_tests: reset thread pool between testsmoneromooo-monero2019-11-101-0/+5
| | | | | | | | | | | | 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.
* Update 2019 copyrightbinaryFate2019-03-051-1/+1
|
* threadpool: allow leaf functions to run concurrentlymoneromooo-monero2018-06-261-3/+4
| | | | | Decrease the number of worker threads by one to account for the fact the calling thread acts as a worker thread now
* threadpool: allow constructing an object, and misc tweaksmoneromooo-monero2018-05-201-5/+9
| | | | | | 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
* threadpool: catch exceptions in dtor, to avoid terminatemoneromooo-monero2018-02-021-1/+2
| | | | | | | | | | 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
* Readd copyright starting datexmr-eric2018-01-261-1/+1
|
* Update 2018 copyrightxmr-eric2018-01-261-1/+1
|
* Tweak concurrency limitsHoward Chu2017-09-151-1/+1
| | | | Create capacity for 2x max, but lie about it
* Use a threadpoolHoward Chu2017-09-141-0/+87
Instead of constantly creating and destroying threads