matthewmueller/joy

Improve Channels & Goroutines implementation

Open

#78 建立於 2017年12月16日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Go (34 fork)github user discovery
bughelp wantedimportant

倉庫指標

Star
 (1,317 star)
PR 合併指標
 (PR 指標待抓取)

描述

Originally we were planning on converting async/await into generators. However, as explained by @FlorianUekermann in #56, there's a good chance the async/await or generator implementation won't be enough:

If you are wondering why someone may want to use non-async event listeners in the first place, consider that JS has a well defined event flow (https://www.w3.org/TR/DOM-Level-3-Events/#event-flow), which gives you a lot of useful guarantees to work with (serial execution of event listeners, ordering of event listeners, bubbling, cancellation, etc.). All of that goes out the window once you are start using async.

Next steps:

  • Create a test case where async/await event handlers produce out of order events

UPDATE Alrighty yep, as suggested by @FlorianUekermann, the problem can be illustrated here: http://jsbin.com/ximexelepa/1/edit?html,js,output

  • Learn more about how gopherjs does it's scheduling

貢獻者指南