The intention here is to create a drop-in replacement for: boost::thread boost::thread_group boost::condition_variable boost::this_thread
These are just interruptible wrappers around the c++11 std:: versions. There are no dependencies, and afaik it’s completely portable.
This allows us to move away from boost threads (which block the movement of other things like mutexes, function, bind, chrono, etc), without having to worry about refactoring to cope with our dependence on interruption points, interruptible condition variables, and interruptible sleeps.
For the places that don’t require interruption, they can just move directly to std::.
The code needs some refinements, comments, and more tests, but I’d like to get a few concept ack’s before continuing. Obviously the next step is to start plugging it all in.
Also, to avoid conflicting with segwit changes and backporting, it may be easier to replace things in some places and not others.
The condition_variable is actually an implementation of condition_variable_any, which means that it will accept any Lockable. So we can mix and match boost::mutex/boost::unique_lock/std::mutex/std::unique_lock without any trouble, if that eases the migration.