cats-effect
cats-effect copied to clipboard
The pure asynchronous runtime for Scala
A relatively common pattern in lock-free structures is something like the following: 1. Check a condition. If true, then return a value 2. Register a callback for when the condition...
Reproduction script (scala-cli): ```scala //> using lib "org.typelevel::cats-effect:3.3.13" import cats.effect.* object Main extends IOApp.Simple: def run = Resource .eval(IO.raiseError(new Exception("Boom"))) .race(Resource.never) .attempt .use(_ => IO.println("Done") ) ``` Running `scala-cli run...
For too long I put up with killing SBT to kill Cats Effect tasks in the console, but finally invested time to figure out the correct way to handle it,...
Specifically the solution proposed in https://github.com/typelevel/cats-effect/pull/2978#issuecomment-1133449561. I don't think we did that yet.
Or rather, it's weird if you `use` the results. For example: ```scala foo.memoize.flatMap(r => r.use(pure) *> r.use(pure)) ``` The second `use` will end up accessing the resource *after* the finalizers...
Minor loophole, but this is something we don't handle correctly today. The exception should be treated the same as an `InterruptedException`, if I understand correctly.
My application completely locks up after some time of running fine. Symtopms: * Nothing gets processed anymore * Fiber dumps (kill -USR1 ) give an error (see below) * Thread...
cc @djspiewak Added learning links by third party resources in the documentation website. For context: I run this website called [Rock the JVM](https://rockthejvm.com/) which creates free and paid learning material...
It's annoying that we need this, but this trips everyone up, most recently @TimWSpence. We should add something to the docs demonstrating how to use CE with scala-cli by explicitly...
Closes https://github.com/typelevel/cats-effect/issues/1302.