This repository has been archived by the owner on Aug 6, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 14
Remove ExecutionContext prepare #22
Open
pjfanning
wants to merge
8
commits into
playframework:master
Choose a base branch
from
pjfanning:remove-prepare
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hi @pjfanning |
@masahitojp is this change ok? Github now has a squash option for merges so I haven't tried to squash the commits myself. |
@pjfanning Thanks! I think it's ok! |
How about this? @marcospereira. I think we should follow Play 2.7 and make it usable with Scala 2.13.x |
+1 |
cchantep
reviewed
Jan 14, 2020
@@ -287,8 +287,6 @@ object Concurrent { | |||
* $paramEcSingle | |||
*/ | |||
def buffer[E](maxBuffer: Int, length: Input[E] => Int)(implicit ec: ExecutionContext): Enumeratee[E, E] = new Enumeratee[E, E] { | |||
val pec = ec.prepare() |
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.
If required for other versions, it cannot be removed as-it or will break back compat
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.
The use of the prepare function is not encouraged.
/** Prepares for the execution of a task. Returns the prepared
* execution context. The recommended implementation of
* `prepare` is to return `this`.
*
* This method should no longer be overridden or called. It was
* originally expected that `prepare` would be called by
* all libraries that consume ExecutionContexts, in order to
* capture thread local context. However, this usage has proven
* difficult to implement in practice and instead it is
* now better to avoid using `prepare` entirely.
*
* Instead, if an `ExecutionContext` needs to capture thread
* local context, it should capture that context when it is
* constructed, so that it doesn't need any additional
* preparation later.
*/
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Fixes
Fixes #21
Purpose
What does this PR do?
Removes the use of ExecutionContext#prepare
Background Context
Why did you take this approach?
Trying to remove deprecated functions.
Pre-supposes #23 will be merged. If that PR is a problem, I can rework this PR.
References
Are there any relevant issues / PRs / mailing lists discussions?
#21