Skip to content

README spring cleaning #5

@ioquatix

Description

@ioquatix

Hey Samuel! Thank you so much for dragging the conversation forward. I honestly believe that bringing the async/await pattern to Ruby should be the news of the year.

I am noticing a few confusing details that I would appreciate clarification on. The chicken counting example is just slightly different between https://github.com/socketry/async-await and https://www.codeotaku.com/journal/2018-06/asynchronous-ruby/index and while I tend to defer to Github, I want to make sure that I'm not missing something important.

First up: I noticed that you mark functions with async never actually call an await function. On your blog, you call .sum(:result) and puts find_all_chickens.result, while on Github there's no mention of the :result and you call a .wait method on the "tree".

It's just confusing that you say "use the await function" and then never call await. ;)

My other question is: which functions need to be marked with async for the magic to happen? Is it callees, callers or both? It doesn't seem to hurt anything to put it on both, but I'd love to understand what's actually required.

Final question for now: what's the deal with barrier!? I see it in the sleep_sort example, which I notice also uses the .result method.

I know that open source work can be thankless. I'm excited about what you've created and I'm hoping that you can do some spring cleaning on your README so that we can take this and run with it without having to bug you.

cc @pjforde1978

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions