Commit 8459d808 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

threads: remove arbitrary timeout in Windows poll() emulation

parent 59f77831
...@@ -81,17 +81,10 @@ static inline int vlc_poll(struct pollfd *fds, unsigned nfds, int timeout) ...@@ -81,17 +81,10 @@ static inline int vlc_poll(struct pollfd *fds, unsigned nfds, int timeout)
{ {
int val; int val;
do vlc_testcancel();
{ val = poll(fds, nfds, timeout);
int ugly_timeout = ((unsigned)timeout >= 50) ? 50 : timeout; if (val < 0)
if (timeout >= 0) vlc_testcancel();
timeout -= ugly_timeout;
vlc_testcancel ();
val = poll (fds, nfds, ugly_timeout);
}
while (val == 0 && timeout != 0);
return val; return val;
} }
# define poll(u,n,t) vlc_poll(u, n, t) # define poll(u,n,t) vlc_poll(u, n, t)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment