Daniel Urban
Daniel Urban
So, let's imagine, that we say that idiomatic CE code should be fine with using Ref/Deferred and use only "structurally reachable" things. If I understand it correctly, this is approximately...
Hm, if it failed, why is the body of `use` called at all? But, I don't think it failed: it succeeded with `Left(new Exception)`.
So, you're basically saying, that since `resource *> error` failed, it should run the finalizer of `resource` even before continuing to the `.attempt`, right? I guess that makes sense, (even...
Yes, exactly: it seems strange to me that those two would be different. (To be clear, we're obviously assuming `resource` does not fail here.) Based on [this comment](https://github.com/typelevel/cats/pull/3241#issuecomment-571398273) by @djspiewak,...
Just linking #2962, as that seems to be the root cause.
I think this is a good idea. I suspect it would('ve) make fixing #3603 almost trivial. (I assume the semantics would be that if a cancel won, the callback would...
To answer my own question: I don't think this should affect `Deferred#complete`. That is a similar, but different thing. With a `Deferred`, there is 0 or more subscribers, and it...
I've started working on this (#3917), and the desired semantics are not entirely clear. What should `resume` return (`true` or `false`), if `resume` wins the race? `get` did not run...
Well, how about something like this: ```scala new Cont[IO, Int, String] { def apply[F[_]](implicit F: Cancelable[F]) = { (resume, get, lift) => lift(IO(resume(Right(42)))) >> F.canceled >> get.map(_.toString) } } ```...
I'm not sure that helps with the "lost value" problem. For example, let's see `asyncCheckAttempt` (`async` is of course similar): ```scala def apply[G[_]](implicit G: MonadCancel[G, Throwable]) = { (resume, get,...