Reactive Slick

Here's the ongoing work on Reactive Slick.

/cc @cvogt for review later
One solution would be to create a
`val andIgnoreDueToRethrowOfPreviousException = PartialFunction[Throwable,
Unit] = { case NonFatal(_) => }`

so you can have:
if(state ne null) try a.cancelStream(ctx, state)
catch andIgnoreDueToRethrowOfPreviousException

Then you can use `find occurrences` to see everywhere it's used.

On Mon, Dec 1, 2014 at 1:00 PM, Stefan Zeiger <notifications@github.com>
wrote:

> In src/main/scala/scala/slick/backend/DatabaseComponent.scala:
>
> > +                if(state ne null) { // streaming cancelled before finishing
> > +                  val oldState = state
> > +                  state = null
> > +                  a.cancelStream(ctx, oldState)
> > +                }
> > +              } else if((realDemand > 0 || (state eq null))) {
> > +                val oldState = state
> > +                state = null
> > +                state = a.emitStream(ctx, realDemand, oldState)
> > +              }
> > +              if(state eq null) { // streaming finished and cleaned up
> > +                releaseSession(ctx, true)
> > +                ctx.streamingResultPromise.success(null)
> > +              }
> > +            } catch { case NonFatal(ex) =>
> > +              if(state ne null) try a.cancelStream(ctx, state) catch { case NonFatal(_) => }
>
> I just have to find the right spot for a comment. This is a very common
> pattern that appears in several places in the codebase.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/slick/slick/pull/1021/files#r21084551>.
>



-- 
Cheers,
√