Skip to content

Commit ec7abc7

Browse files
committed
Reverted transferState
1 parent cbdad86 commit ec7abc7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Binary file not shown.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,11 +940,11 @@ private[effect] final class WorkerThread[P <: AnyRef](
940940
transferState.index = idx
941941
transferState.tick = tick + 1
942942

943+
// Register this thread in the blockerThreads map
943944
val _ = pool.blockerThreads.put(this, java.lang.Boolean.TRUE)
944945

945946
if (pool.transferStateQueue.offer(transferState)) {
946947
// If successful, a waiting thread will pick it up
947-
// Register this thread in the blockerThreads map
948948

949949
} else {
950950
// Spawn a new `WorkerThread`, a literal clone of this one. It is safe to
@@ -970,7 +970,7 @@ private[effect] final class WorkerThread[P <: AnyRef](
970970
system,
971971
_poller,
972972
metrics,
973-
new WorkerThread.TransferState,
973+
transferState,
974974
pool)
975975
// Make sure the clone gets our old name:
976976
val clonePrefix = pool.threadPrefix

0 commit comments

Comments
 (0)