Skip to content

Commit

Permalink
register -> access
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Aug 14, 2024
1 parent caee0e8 commit 9faca58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private[unsafe] abstract class IORuntimeCompanionPlatform { this: IORuntime.type

(
threadPool,
pollingSystem.makeApi(threadPool.register),
pollingSystem.makeApi(threadPool.access),
{ () =>
unregisterMBeans()
threadPool.shutdown()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private[effect] final class WorkStealingThreadPool[P](
private[unsafe] val pollers: Array[P] =
new Array[AnyRef](threadCount).asInstanceOf[Array[P]]

private[unsafe] def register(cb: P => Unit): Unit = {
private[unsafe] def access(cb: P => Unit): Unit = {

// figure out where we are
val thread = Thread.currentThread()
Expand All @@ -97,8 +97,8 @@ private[effect] final class WorkStealingThreadPool[P](
if (worker.isOwnedBy(pool)) // we're good
cb(worker.poller())
else // possibly a blocking worker thread, possibly on another wstp
scheduleExternal(() => register(cb))
} else scheduleExternal(() => register(cb))
scheduleExternal(() => access(cb))
} else scheduleExternal(() => access(cb))
}

/**
Expand Down

0 comments on commit 9faca58

Please sign in to comment.