Skip to content

Commit

Permalink
remove unnecessary exec ctx prep from Iteratee.flatMap
Browse files Browse the repository at this point in the history
commit 2b276d2 implemented the lines:
```
case Step.Done(a, Input.Empty) => executeIteratee(f(a))(ec /* still on same thread; let executeIteratee do preparation */ )
case Step.Done(a, e) => executeIteratee(f(a))(ec.prepare /* still on same thread; let executeIteratee do preparation */ ).pureFlatFold {
```
However, the `ec.prepare` is incongruous with the adjacent comment, and the preparation is definitely not required as the preparation is indeed handled by `executeIteratee`.
  • Loading branch information
dwhjames committed Jan 12, 2014
1 parent 3ec7eed commit 19d49a9
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -491,7 +491,7 @@ trait Iteratee[E, +A] {
def flatMap[B](f: A => Iteratee[E, B])(implicit ec: ExecutionContext): Iteratee[E, B] = {
self.pureFlatFoldNoEC { // safe: folder either yields value immediately or executes with another EC
case Step.Done(a, Input.Empty) => executeIteratee(f(a))(ec /* still on same thread; let executeIteratee do preparation */ )
case Step.Done(a, e) => executeIteratee(f(a))(ec.prepare /* still on same thread; let executeIteratee do preparation */ ).pureFlatFold {
case Step.Done(a, e) => executeIteratee(f(a))(ec /* still on same thread; let executeIteratee do preparation */ ).pureFlatFold {
case Step.Done(a, _) => Done(a, e)
case Step.Cont(k) => k(e)
case Step.Error(msg, e) => Error(msg, e)
Expand Down

0 comments on commit 19d49a9

Please sign in to comment.