Skip to content

Commit

Permalink
work-a-round bug in Juila <1.9.2
Browse files Browse the repository at this point in the history
Apparently in Julia 1.9.0 and 1.9.1, `Threads.@Spawn Threads.threadpool() 1` does not work.
  • Loading branch information
samtkaplan committed Mar 12, 2024
1 parent f6bdb95 commit cb44b09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ConcurrentUtilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export Lockable, OrderedSynchronizer, reset!, ReadWriteLock, readlock, readunloc
Pool, acquire, release, drain!, try_with_timeout, TimeoutException

macro samethreadpool_spawn(expr)
if isdefined(Base.Threads, :threadpool)
if VERSION >= v"1.9.2"
esc(:(Threads.@spawn Threads.threadpool() $expr))
else
esc(:(Threads.@spawn $expr))
Expand Down

0 comments on commit cb44b09

Please sign in to comment.