Ryan Benasutti
10/26/2019, 4:55 PMIO::bracket
works well when you have something like this:
IO { take a resource safely }.bracket(release = { give it back }, use = { use it in a way that can fail })
but what about the case where taking the resource can also fail? Is there a method that can handle this, or do I need another bracket
?Jannis
10/26/2019, 5:21 PMJannis
10/26/2019, 5:22 PMJannis
10/26/2019, 5:27 PMsimon.vergauwen
10/27/2019, 11:41 AMI always understood failure in resource acquisition to mean that the resource was not acquired
simon.vergauwen
10/27/2019, 11:44 AMbracket
is useful for resource safety across async jumps. When you’re i.e opening a file with cached bounded pool and processing it on an unbounded pool.simon.vergauwen
10/27/2019, 11:45 AM