From e0efeba88de0b5c4c8d8ae63e6ca9b254f7b9f5d Mon Sep 17 00:00:00 2001 From: Andries Hiemstra Date: Thu, 15 Apr 2021 10:22:22 +0200 Subject: [PATCH] made is_loop_worker methods pub --- src/eventloop.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eventloop.rs b/src/eventloop.rs index 3611900c6..b6e3818f0 100644 --- a/src/eventloop.rs +++ b/src/eventloop.rs @@ -156,7 +156,7 @@ impl EventLoop { } /// internal method to ensure a member is called from the worker thread - fn is_my_pool_thread(&self) -> bool { + pub fn is_my_pool_thread(&self) -> bool { LOCAL_ID.with(|rc| { let opt = &*rc.borrow(); opt.is_some() && opt.unwrap() == self.id @@ -164,7 +164,7 @@ impl EventLoop { } /// internal method to ensure a member is called from the worker thread - fn is_a_pool_thread() -> bool { + pub fn is_a_pool_thread() -> bool { SPAWNER.with(|rc| rc.borrow().is_some()) }