Skip to content

Commit

Permalink
Closes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
tro3 committed Jun 26, 2020
1 parent 6e9fe74 commit 1b3d76b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ThreadPools"
uuid = "b189fb0b-2eb5-4ed4-bc0c-d34c51242431"
authors = ["Trey Roessig <[email protected]"]
version = "1.1.0"
version = "1.1.1"

[deps]
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Expand Down
4 changes: 2 additions & 2 deletions src/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Note that execution order is not guaranteed, but the primary thread does not
show up on any of the jobs.
"""
macro logbthreads(args...)
return _pthread_macro(:(LoggedQueuePool(2)), true, args...)
return _pthread_macro(:(LoggedStaticPool(2)), true, args...)
end

"""
Expand Down Expand Up @@ -202,7 +202,7 @@ julia> plot(pool)
Note that execution order is not guaranteed and the primary thread is used.
"""
macro logqthreads(args...)
return _pthread_macro(:(LoggedStaticPool(1)), true, args...)
return _pthread_macro(:(LoggedQueuePool(1)), true, args...)
end

"""
Expand Down
1 change: 1 addition & 0 deletions test/testmacros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ include("util.jl")
pool = @logqthreads for x in objs
Threads.threadid() == 1 && (primary = true)
x.data += 1
sleep(0.001)
end
@test primary
@test [x.data for x in objs] == collect(2:N+1)
Expand Down

2 comments on commit 1b3d76b

@tro3
Copy link
Owner Author

@tro3 tro3 commented on 1b3d76b Jun 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/16995

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.1 -m "<description of version>" 1b3d76bfaed3cc5da90e053220f2ba0f2bf59f64
git push origin v1.1.1

Please sign in to comment.