Skip to content

Commit

Permalink
made is_loop_worker methods pub
Browse files Browse the repository at this point in the history
  • Loading branch information
andrieshiemstra committed Apr 15, 2021
1 parent 964bc15 commit e0efeba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/eventloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ 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
})
}

/// 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())
}

Expand Down

0 comments on commit e0efeba

Please sign in to comment.