You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yep. I've written libuv bindings about 6 times now, timer is the easiest place to start. It's simple and easy to test. Then I would tackle TCP. It's one of the hardest and touches all the tough parts in design because it deals with multiple levels of methods in libuv and has a mix of handle methods some with requests and some without. The hardest stuff is in uv_stream_t, but that's required by uv_tcp_t.
Once you have Timer and TCP, most the rest is straightforward. Spawn is probably the remaining tricky one as it's got some parts a little different.
Oh and in a single-threaded system like JavaScript, There is little reason to expose the loop instance directly. I tend to create one loop per VM instance (which is generally also per OS thread). This is better than simply using the default loop, but still hides loop instance management from JavaScript.
This would probably be easiest to start by integrating
uv_loop
anduv_handle
, and then implementinguv_timer*
.The text was updated successfully, but these errors were encountered: