-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reorder pmap arguments to allow do-block syntax #26783
reorder pmap arguments to allow do-block syntax #26783
Conversation
stdlib/Distributed/src/pmap.jl
Outdated
pmap(f, c1, c...; kwargs...) = pmap(a->f(a...), zip(c1, c...); kwargs...) | ||
|
||
@deprecate pmap(p::AbstractWorkerPool, f, c; kwargs...) pmap(f, p, c; kwargs...) | ||
@deprecate pmap(p::AbstractWorkerPool, f, c1, c...; kwargs...) pmap(f, p, c1, c...; kwargs...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should go in base/deprecated.jl
near the bottom with a reference to the issue this closes. Other entries in that file should provide a decent example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I was confused because this is an stdlib package. Do those deprecations still live in base/deprecated.jl
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh you're absolutely right, sorry about that, I had forgotten that pmap
moved to the stdlib. In that case it looks like other Distributed deprecations are done in stdlib/Distributed/src/Distributed.jl
near the bottom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries! Just pushed another commit that moves them to Distributed.jl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* origin/master: A few more #26670 fixes (#26773) Revert "deprecate using the value of `.=`. fixes #25954" (#26754) change dim arguments for `diff` and `unique` to keyword args (#26776) reorder pmap arguments to allow do-block syntax (#26783) correct deprecated parametric method syntax (#26789) [NewOptimizer] handle new IR nodes correctly in binary format [NewOptimizer] support line number emission from new IR format fix #26453, require obviously-concrete lower bound for a var to be diagonal (#26567) fix #26743, spurious `return` path in try-finally in tail position (#26753) Also lift SelectInst addrspaces
This fixes #26684
Now you can do something like:
I wasn't entirely sure where I should put the deprecations, so I put them near the
pmap
definition, but happy to move them if there's a better location.