The cool thing about this setup is that it checks the box of running *at most* at 60fps. If no events are received on the channel during a frame tick, nothing will happen. Which is good b/c we don't want the render loop to spin. Also think it maps nicely to streams/futures.
-
-
Show this thread
-
To map this to Choo's architecture, instead of passing a channel directly to the render loop we could clone a tuple of `(Sender, T)`, where T is some `State` (Clone + Send, etc.) and Sender is part of a broadcaster. The loop would then listen for "Render" messages on the channel
Show this thread -
I strongly suspect we'll be able to implement most of Choo v4/v5 in Rust; the concepts seem to map really well so far.
Show this thread -
Welp, implemented it (compiles, not tested). Guess I can check off "port nanoraf to Rust" for now: https://github.com/choojs/nanoraf I'll probably open up the repo I'm working on soonish. It's just for fun so eh.
Show this thread -
Another fun one: RequestIdleCallback is basically a `spawn_blocking` but ran in the background with a max timeout. If we were to create some kind of TaskBuilder we could enable configuring priority and timeout params to construct both microtask queue tasks, and idle tasks.
Show this thread -
Being able to write async rust AND web APIs means I'm feeling right at home lol. This is basically catnip for me.
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.