3 ms·
The wangle native way of doing this is just to use an IOThreadPoolExecutor: https://github.com/facebook/wangle/blob/master/wangle/concurrent/IOThreadPoolExecuto
by jhartmann 10y ago
The wangle native way of doing this is just to use an IOThreadPoolExecutor: https://github.com/facebook/wangle/blob/master/wangle/concurrent/IOThreadPoolExecutor.h https://github.com/facebook/wangle/blob/master/wangle/concur...
Just make a block of threads to run your db tasks, and you can use a promise/future to return the results back to the async code.