Closed
Description
- Version: Current v1.x head
- Platform: At least all UNIX
uv_fs_poll_t
uses stat requests internally. However, such an internal request may be pending even when the close callback for uv_fs_poll_t
is called; that doesn’t seem right to me? In particular, after the close
callback, from a library user’s point of view it looks like the event loop can be closed, but that fails because the stat req is still active.
There’s also this TODO
comment by @bnoordhuis that seems very related:
Line 37 in 0cdb4a5
I’m not sure how exactly that would look like, though.
addaleax@78ea583 has a regression test for this.
Metadata
Metadata
Assignees
Labels
No labels
Activity
bnoordhuis commentedon Jun 8, 2018
I think that can be fixed by postponing the close callback until the internal timer handle and fs request have closed/finished.
Right now
uv_close()
callsuv__make_close_pending()
(uv_want_endgame()
on Windows) immediately but that needs to be delayed.unix, win: make fs-poll close wait for resource cleanup
unix, win: make fs-poll close wait for resource cleanup
unix, win: make fs-poll close wait for resource cleanup
unix, win: make fs-poll close wait for resource cleanup
unix, win: make fs-poll close wait for resource cleanup