Hi, I was questioning if this ifdefs regarding sleep portability is still required, at the top of the multi-single example: https://github.com/curl/curl/blob/master/docs/examples/multi-single.c#L37 ? I think this should be part of the curl library itself, if it isn't already 😄 . ```c #ifdef _WIN32 #define WAITMS(x) Sleep(x) #else /* Portable sleep for platforms other than Windows. */ #define WAITMS(x) \ struct timeval wait = { 0, (x) * 1000 }; \ (void)select(0, NULL, NULL, NULL, &wait) #endif ``` Regards, Melroy van den Berg
Activity
jay commentedon Dec 30, 2021
You mean add a curl_sleep()? I don't see much use of it.
bagder commentedon Dec 30, 2021
WAITMS()is not even used in the example code ... 😄 I'll remove it.examples/multi-single.c: remove WAITMS()
melroy89 commentedon Dec 30, 2021
Thank you Daniel. This is what I was thinking as well.
melroy89 commentedon Dec 30, 2021
I think this multi_poll code has a sleep. To avoid busy waiting.