Hi Jon, Jonathan Houser wrote:
>> Your command gives: >> >> #0 0xffffe002 in ?? () >> #1 0x080c0710 in gwthread_sleep () >> #2 0x08051df4 in main () >> #3 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6 > > Looking at the code that entails, I noticed something: > > milliseconds = seconds * 1000; > if (milliseconds < 0) > milliseconds = POLL_NOTIMEOUT; > > Should the above instead be: > > milliseconds = seconds * 1000; > if (milliseconds <= 0) > milliseconds = POLL_NOTIMEOUT; > > So that you always have a value for milliseconds (and thus actually > sleep)? no it's correct as is... gwthread_sleep allow you to pass negative value e.g. -1 then thread will sleap without timout. when caller pass 0 to gwthread_sleep then it's a bug in the caller but not library. > > Jon -- Thanks, Alex
