- Notifications
You must be signed in to change notification settings - Fork 1k
Execution context#304
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
Execution context #304
Uh oh!
There was an error while loading. Please reload this page.
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.
Look i've changed the link. But you might want to remove it as it points at http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ForkJoinPool.html ?
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 don't think there is a license problem with pointing back to Oracle's Java documentation.
Please break these two sentences into two lines.
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'm having second thoughts about mentioning FJ pool here.
The current ExecutionContext.global implementation, even though it's unlikely to change,
should be mentioned at most in the ScalaDoc API.
Otherwise, our documentation is too flaky, and it becomes hard to maintain the crossreferences.
This doc should discuss only the high-level usage and meaning of execution contexts,
not the specific implementation.
It is also unclear if we should mention minThreads, numThreads and maxThreads configuration settings,
since they are not mentioned explicitly in the API docs.
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 would suggest that you refactor this section, so that all mention of ForkJoinPool is put in a separate section,
entitled e.g. "Execution Contexts based on Fork/Join Pools".
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 disagree, references of ExecutionContext.global are all over that documentation. So you might be right in theory, but in practice people will be using (and abusing) the global EC. Documenting how this works and flagging potential issues isn't low-level details.
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 would suggest that you refactor this section, so that all mention of ForkJoinPool is put in a separate section,
entitled e.g. "Execution Contexts based on Fork/Join Pools".
That's actually what I did by wrapping FJP details into the The Global Execution Context section.
SethTisue commented Jul 23, 2015
review by @viktorklang and @axel22? |
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.
We normally write the type ascription immediately after the identifier, without the space:
val inverseFuture: Future[Matrix] = ... 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 recommend making the example take the EC as an implicit parameter to foster a culture of getting the EC passed in rather than defining it locally.
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.
Agree - the more idiomatic version below could be sufficient.
axel22 commented Jul 23, 2015
Thanks a lot for taking the effort to improve the documentation to this extent! |
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'd suggest:
is a placeholder object for a value that may not yet exist.
SethTisue commented Aug 23, 2015
@backuitist interested in getting this across the finish line...? |
backuitist commented Aug 24, 2015
Sorry, that went off my radar. |
a34a8a3 to ec26babCompareec26bab to c690c20CompareSethTisue commented Sep 2, 2015
@axel22@viktorklang lgty now? |
axel22 commented Sep 7, 2015
I would fix that one last colon, but it looks good to me. |
c690c20 to c346d1eCompareSethTisue commented Sep 11, 2015
yay, across the finish line! thank you @backuitist for your great patience, thank you reviewers. (@viktorklang, it's of course not too late for further changes.) |
viktorklang commented Sep 11, 2015
@SethTisue :-) |
I've integrated some of your comments ;)