Peter Johnson
76f5d153fa
wpiutil: Add Stop() to EventLoopRunner
...
This allows stopping the event loop without having to destroy the object.
Also fix ExecSync() to actually wait for the call to complete.
2018-11-09 23:33:55 -08:00
Peter Johnson
1a7a0db1ff
wpiutil: Change uv::AsyncFunction to use promise/future.
...
This allows the called function to pass along the promise to another
asynchronous callback.
To avoid memory allocations, add a home-rolled, simplified, non-allocating
version of std::promise and std::future as wpi::promise and wpi::future.
2018-10-16 09:40:59 -07:00
Peter Johnson
18c8cce6a7
SafeThread: Avoid use-after-free risk in thread shutdown ( #1355 )
...
Use shared_ptr to keep data alive until the thread has terminated.
2018-10-05 16:32:43 -07:00
Peter Johnson
de6d6c9a5c
wpiutil: EventLoopRunner: Allow getting the loop shared_ptr.
2018-10-05 13:32:51 -07:00
Peter Johnson
8d8f120cc3
EventLoopRunner: Use AsyncFunction
2018-08-20 22:21:53 -07:00
Peter Johnson
e2314f3528
wpiutil: Add C++ libuv wrappers ( #1166 )
...
- Provide an EventLoopRunner to run uv::Loop on a separate thread.
- Add raw_ostream wrapper for uv::Buffer.
2018-07-17 01:06:24 -07:00