Re: Use CFRunLoop to simulate WaitForMultipleObejcts
Re: Use CFRunLoop to simulate WaitForMultipleObejcts
- Subject: Re: Use CFRunLoop to simulate WaitForMultipleObejcts
- From: Boaz Stuller <email@hidden>
- Date: Wed, 15 Dec 2004 11:49:23 -0500
My guess is that you just need to divide dwMilliseconds by 1000.0 not
1000 (so you do floating point rather than integer division). Because
integer division rounds down, if your function is called with
dwMilliseconds < 1000, it will call CFRunLoopRunInMode with a timeout
of 0. This will cause the run loop to process only a single source
and return a timeout if there are any more waiting, which sounds like
what you're experiencing.
Best of luck,
Bo
On Wed, 15 Dec 2004 11:42:46 +0800, Alex Guo
<email@hidden> wrote:
>
>
> Hi, All
>
> I'm now involved in a networking porting project. I use CFRunLoop to
> simulate
> WaitForMultipleObjects (API on Windows platform), but the following function
> works
> only when just one runloopsource is registered with the runloop. When more
> than
> one runloopsource are registered, it always timeout... What should I do?
> Any tips are highly appreciated. thanks in advance.
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden