Skip to content

Commit f012d9e

Browse files
committed
Fix ownsPoller and ownsTimers for blocking threads
1 parent 3845296 commit f012d9e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/jvm-native/src/main/scala/cats/effect/unsafe/WorkerThread.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,10 @@ private[effect] final class WorkerThread[P <: AnyRef](
301301
}
302302

303303
private[unsafe] def ownsPoller(poller: P): Boolean =
304-
poller eq _poller
304+
(poller eq _poller) && (!blocking)
305305

306306
private[unsafe] def ownsTimers(timers: TimerHeap): Boolean =
307-
sleepers eq timers
307+
(sleepers eq timers) && (!blocking)
308308

309309
/**
310310
* The run loop of the [[WorkerThread]].

0 commit comments

Comments
 (0)