mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
[wpiutil] uv::Async: Add direct call for no-parameter specialization (#3648)
This commit is contained in:
@@ -151,7 +151,12 @@ class Async<> final : public HandleImpl<Async<>, uv_async_t> {
|
||||
*/
|
||||
void Send() {
|
||||
if (auto loop = m_loop.lock()) {
|
||||
Invoke(&uv_async_send, GetRaw());
|
||||
if (loop->GetThreadId() == std::this_thread::get_id()) {
|
||||
// called from within the loop, just call the function directly
|
||||
wakeup();
|
||||
} else {
|
||||
Invoke(&uv_async_send, GetRaw());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user