Async chkinsertsender riskier cleanup
This branch makes CHKInsertSender and CHKInsertHandler largely asynchronous, and greatly reduces the number of threads needed on high bandwidth nodes. It has been tested reasonably thoroughly, both on my local node and in the synthetic RealNodeULPR/RequestInsert tests. Please seriously consider this for a test build for wider testing, and let me know about cleanups/style issues I've missed. Thanks!
There are two other async-chk* branches that might be marginally lower risk.
This seems to work on my node and also in synthetic tests (RealNodeRequestInsertTest and RealNodeULPRTest). Please consider for merging into a test release. It should greatly reduce the number of threads needed on high bandwidth nodes.
Unfortunately this might be affected by issues in #400. One possibility is to leave out the last commit but I'm concerned about memory usage. So this might be blocked... :(
@toad Bombe said that #400 is OK now, is there something else blocking this?
Not IIRC, although it should be tested carefully, especially in vitro.
Tested for days without problems in vivo. Number of running threads was reduced drastically by this changeset — well done.
I did not review the code except for quickly reading through, nor did I test anything in vitro except for unit tests.
Merged next into the branch. Please consider for 1472.
Whee, more conflicts.