typesafehub/activator-akka-stream-scala — pull request #19 by timcharper (2014-12-24 19:14:47+00:00)
Title: Fixes GroupLogFile example early-shutdown

This is my best attempt at writing idiomatic akka-stream code.

Although I agree that it's optimal, the `buffer`, `mapAsyncUnordered`, and `foreach` feels like a lot of steps to do something as simple as "wait for all of these promises to end and then give me a future". Maybe a new method, `foreachAsync`, could help? (although, then do you implement foreachAsyncUnordered, also? Don't want to encourage API Cartesian explosion).

I was tempted to have each mapped group yield a Future[PrintWriter], but yielding stateful objects through a stream felt wrong. It seemed better to have the stream close declaration close to the stream open, also, even though it ended up being more verbose.