saghul / txiki.js

A tiny JavaScript runtime
MIT License
2.37k stars 157 forks source link

core: refactor timers #492

Closed saghul closed 1 month ago

saghul commented 1 month ago

1) This is important because the libuv loop outlives the JS runtime. Since handle closing is not sync and the callback where we need to free the structures will be called later it's not safe to use it. This is a small step in the direction of not using the JS allocator for structures that embed libuv handles.