HN user

ioquatix

1,352 karma

http://www.codeotaku.com

Posts16
Comments474
View on HN
Async Ruby 5 years ago

The fiber scheduler also hooks into the `Timeout` module to provide safe(r) timeouts using the event loop.

Async Ruby 5 years ago

Every task is a promise you can wait on for the result. Concurrent fan out is trivial.

Async Ruby 5 years ago

The gem namespace was transferred to me some time around 2017.

Async Ruby 5 years ago

ActiveRecord does work but it’s hugely limited because they have explicit per-thread resource pools which we can’t get around very easily.

Async Overloading 5 years ago

When designing an API in Rust which performs IO, you have to make a decision whether you want it to be synchronous, asynchronous, or both.

Why must that be true? Why can't you write the interface once, and have concurrency be an implementation detail?

Nope, they are totally different. However, the DB gem is an interface/driver similar to PHP's PDO, while AR is a set of drivers, interfaces and high level ORM interfaces. In theory, one could probably use DB as a driver under AR. One person even basically uses AR to generate SQL and then executes it with the DB gem, which I thought was pretty clever.