Closed
Description
I've been taking a look at the AsyncWrap this week and I think it's time we discuss whether it has a future in core. Things that stand out:
- Besides a 1.5 year old NodeSource blog post it's undocumented.
- It is unclear to me whether there are any users.
- There is only minimal test coverage. For example, the functionality of the
_asyncQueue
property is untested. It's hard to determine whether AsyncWrap is really in a working state (also because of point 2); it's almost certainly broken for things like timers that don't have a 1-to-1 mapping to libuv handles. - It results in a fair amount of complexity and duplication. For example, the
node::MakeCallback()
andnode::AsyncWrap::MakeCallback()
functions are just different enough that it's awkward to unify them, resulting in ~200 lines of duplicated code.
For the sake of keeping core maintainable, I would like people to comment on whether AsyncWrap is something that we should keep.
cc @nodejs/ctc, @trevnorris in particular, and @AndreasMadsen