We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba1eaed commit c664d7fCopy full SHA for c664d7f
core/src/main/scala/ox/internal/ThreadHerd.scala
@@ -88,8 +88,12 @@ private[ox] class ThreadHerd(threadFactory: ThreadFactory):
88
89
currentScope.get() match
90
case null =>
91
- throw new IllegalStateException("Forks can only be started inside a concurrency scope, or from other forks started in the scope.")
+ throw new IllegalStateException(
92
+ "Forks can only be started inside a running concurrency scope, or from other forks started in the scope. " +
93
+ s"Creating this fork was attempted from an unrelated thread: ${Thread.currentThread.getName}."
94
+ )
95
case scope => doAssert(scope)
96
+ end match
97
end verifyCurrentThreadInScopeTree
98
99
private def assertOnOwnerThread(): Unit =
0 commit comments