|
|
|
|
|
by threeseed
493 days ago
|
|
I use ZIO (https://zio.dev) and nothing really like it exists on any platform. You can wrap any computation in a single ZIO object e.g. normal, callback, future, promise etc. Which you can then chain together in different ways e.g. run them in parallel, sequentially, race them against each other and kill the loser, schedule in elaborate ways, run with a timeout and then run another if it’s exceeded etc. And it will execute this either using normal or virtual threads i.e. fibers without locks so it’s extremely fast. But the incredible part is that it does all of this whilst seamlessly handling every type of error. Which if you’ve ever written complex concurrent code is extremely hard to get right. |
|