You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 6, 2020. It is now read-only.
At the moment Concurrent.unicast is really hard to use. It should often be used instead of Concurrent.broadcast, but I think it's just too hard to work out. I wanted to suggest updating the docs in #3336 to use Concurrent.unicast but I couldn't write the code succinctly.
Make a new Concurrent.unicast method that creates an Enumerator that can only be used once. Only being usable once will simplify the code and make things more efficient..
Change the signature to use Futures instead of callbacks. We can do this because we're only using the Enumerator once.
/** * @paramchannel The Channel to push inputs down. * @paramcompletion A future that will be completed when the attached * Iteratee is Done or completes with an Error. Will be a failure if the * Iterate had an error.*/finalcaseclassUnicast[E](channel: Channel[E], completion: Future[Unit])
defunicast[E]: (Enumerator, Future[Unicast])
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
From playframework/playframework#3619
At the moment
Concurrent.unicast
is really hard to use. It should often be used instead ofConcurrent.broadcast
, but I think it's just too hard to work out. I wanted to suggest updating the docs in #3336 to useConcurrent.unicast
but I couldn't write the code succinctly.Here's the current method signature:
What I propose:
Concurrent.unicast
method that creates anEnumerator
that can only be used once. Only being usable once will simplify the code and make things more efficient..Future
s instead of callbacks. We can do this because we're only using theEnumerator
once.The text was updated successfully, but these errors were encountered: