• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Use CFRunLoop to simulate WaitForMultipleObejcts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Use CFRunLoop to simulate WaitForMultipleObejcts (From: "Alex Guo" <email@hidden>)

  • Prev by Date: NSSocketPort bug?
  • Next by Date: Re: NSSocketPort bug?
  • Previous by thread: Use CFRunLoop to simulate WaitForMultipleObejcts
  • Next by thread: Substituting low level BSD stuff with spiffy Cocoa calls
  • Index(es):
    • Date
    • Thread