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
However, when I use uvloop, the os.unlink() call raises a FileNotFoundError exception.
I was wondering if you already know about this and if it is intentional?
I don't mind adding a try/except clause to silence the exception, but if you're aiming for this event loop to be a drop-in replacement for the built-in event loop, I guess you're going to want to change this?
No worries Yuri. I don't think we'd do that. See the comment before the unlink, it prevents a race.
Alternatively, you can create a UNIX socket with the Python socket module and use uv_pipe_open, that way the path won't be unlinked because libuv doesn't store it.
Activity
1st1 commentedon May 20, 2016
Hm, libuv unlinks the path unconditionally, I can't do anything about it.
@saghul, sorry for bothering you, do you think it's possible to add a flag in libuv to tell it not to unlink the path in
uv__pipe_close?[-]UNIX socket is automatically unliked[/-][+]UNIX socket is automatically unlinked[/+]1st1 commentedon May 20, 2016
Alternatively we can re-create the
pathonce the unix socket is closed, but it feels too hacky to me.saghul commentedon May 20, 2016
No worries Yuri. I don't think we'd do that. See the comment before the unlink, it prevents a race.
Alternatively, you can create a UNIX socket with the Python socket module and use uv_pipe_open, that way the path won't be unlinked because libuv doesn't store it.
Don't cleanup UNIX server sockets paths when server is closing
1st1 commentedon May 20, 2016
@saghul Good idea, I followed your advice :)
@AndreLouisCaron Thanks for reporting this! Should be fixed in the
masterbranch; I'll also issue a new uvloop release shortly.AndreLouisCaron commentedon May 21, 2016
Thanks!
1st1 commentedon May 21, 2016
I've just released uvloop v0.4.26. Please check it out.
AndreLouisCaron commentedon May 22, 2016
Just tried 0.4.26 and it now works as expected! Thanks!
1st1 commentedon May 22, 2016
Thanks! Closing the issue.