mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Change uv::Async to accept data parameters
This is a breaking change as it makes Async a template (e.g. Async<> must be used instead of just Async). When data parameters are provided, an internal mutex and vector is used to hold the parameter packs until the loop runs.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
namespace wpi {
|
||||
namespace uv {
|
||||
|
||||
std::shared_ptr<Async> Async::Create(Loop& loop) {
|
||||
std::shared_ptr<Async<>> Async<>::Create(Loop& loop) {
|
||||
auto h = std::make_shared<Async>(private_init{});
|
||||
int err = uv_async_init(loop.GetRaw(), h->GetRaw(), [](uv_async_t* handle) {
|
||||
Async& h = *static_cast<Async*>(handle->data);
|
||||
|
||||
Reference in New Issue
Block a user