Polyphony: Fine-Grained Concurrency for Ruby
Thank you for this.<p>I am interested in how concurrency can be represented elegantly and efficiently, so I am interested in how libraries can simplify async and make it easier to reason about and write<p>What kind of code do you want to be capable of writing? Any imaginary syntax you can think of?<p>The libev and ioring support is great for IO scalability (<a href="https:&#x2F;&#x2F;github.com&#x2F;enki&#x2F;libev">https:&#x2F;&#x2F;github.com&#x2F;enki&#x2F;libev</a> not sure if this is the official repo)<p>In Python I use the &quot;select&quot; module and use epoll on Linux.<p>I am currently thinking of designing an API that allows the registration of epoll-like listeners to arbitrary objects, including business objects, so you can efficiently register a listener on multiple behaviours of multiple arbitrary objects.<p>I wrote an async&#x2F;await simulation in Java and my scheduler is really simple, it&#x27;s just a for loop that checks to see if there are any tasks that can progress. I notice the switch_fiber in polyphony must do something similar. This is similar to a yield in a coroutine.<p>My async&#x2F;await simulation takes the following program:<p><pre><code>  task1:
  while True:
    handle1 = async task2();
    handle2 = async task3();
    print(await handle1)
    print(await handle2)

  task2:
  n = 0
  while True:
      yield n++

  task3:
  n = 0
  while True:
    yield n++
</code></pre>
I had someone on HN explain to me how async works in Rust, but I&#x27;ve not written enough Rust to truly understand async in rust. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33592334" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33592334</a>