-
-
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
Move some spawn related macro docs out of HelpDB #22573
Conversation
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.
Superficially, LGTM
base/distributed/macros.jl
Outdated
""" | ||
@spawn | ||
|
||
Creates a closure around an expression and runs it on an automatically-chosen process, |
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.
Perhaps an opportunity to imperative-ize these?
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.
And why not add some examples while we're here...
base/distributed/macros.jl
Outdated
@@ -30,8 +47,20 @@ end | |||
""" | |||
@spawnat | |||
|
|||
Accepts two arguments, `p` and an expression. A closure is created around the expression and | |||
run asynchronously on process `p`. Returns a [`Future`](@ref) to the result. | |||
Create a closure is created around the expression and run the closure |
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.
this seems redundant
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.
whoops
|
||
Create a closure around an expression and run the closure | ||
asynchronously on process `p`. Returns a [`Future`](@ref) to the result. | ||
Accepts two arguments, `p` and an expression. |
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.
Perhaps augmenting the signature (rather than describing the signature in the docstring body) would be more consistent with other docstrings?
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 looked at a bunch of other macros in the docs and none of them list their args in the signature. I think that's worth doing but perhaps as a separate PR?
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.
lgtm modulo the minor signature comment/question! :)
spawn(command)
stubbornly remains, I suppose because it's one of those things that's tightly wound in with the code insrc/
?