back

by thunderbong·6y ago·view on hn ↗
I understand async/await as I'm conversant with NodeJs. When you mentioned asyncio, I assumed it be something specific in the Python library.

In case of Ruby, I've found these libraries (ruby gems) to be very useful.

1. Sidekiq - https://github.com/mperham/sidekiq

2. RocketJob - https://github.com/rocketjob/rocketjob

What I'm guessing you're saying is that this kind of behavior is available natively in Python, whereas in Ruby, it is achieved by some roundabout fashion.

2 comments
These gems are not really related to the asyncio stuff in python. (They're async job runners though... overloaded names can be annoying)

async/await works at a function level in the same process. Asyncio in python is pretty much the async/await from node/js.

Sidekiq alternative in python would be closer to http://www.celeryproject.org/

Yes, async functions are natively available in python3.6+ and node7+, and requires a gem in ruby. Ruby can also use fibers and eventloop to do concurrency using just the standard library, but it is missing the async/await syntactic sugar.