2 ms·
In RethinkDB which is C++ with a home rolled m:n threads library, it passes in an "interruptor" which is like a one shot chan struct{} you can wait upon or sele
by SamReidHughes 9y ago
In RethinkDB which is C++ with a home rolled m:n threads library, it passes in an "interruptor" which is like a one shot chan struct{} you can wait upon or select over with other chans. The main difference is that the functions which take an interruptor and throw an interrupted_exc_t exception. You could add language support for doing this sort of stuff automatically, or very conveniently, though it would need a bit of care when lambdas or closures get involved.