• 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
POSIX sockets and event loops
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

POSIX sockets and event loops


  • Subject: POSIX sockets and event loops
  • From: Aaron Ballman <email@hidden>
  • Date: Thu, 20 May 2004 15:57:17 -0500

As much as I hate to admit this: we have an event loop that's using WaitNextEvent. When sockets are active, we pause for as little time possible (pass in 0 to WaitNextEvent), yet I am still finding that about 15% of my application's time is being spent in that one call. I am determining this by using Shark FWIW.

Because my application uses select to poll the socket for sends and receives, this sort of a hiccup in the application's event loop seems to slow my transfers down more than I care for.

Aside from the obvious (but quite difficult) answer of: stop using WaitNextEvent and use Carbon events everywhere... is there a way to cause WaitNextEvent to wake up when network I/O is occurring? For example, if I were to use signals instead of select, would the signals cause WaitNextEvent to not delay so long?

Thanks!

~Aaron

--
In response to a stupid question I once asked: "My brain uses patterns to format responses to your inputs, but I don't have one for that. Do you speak German?" ~ Zola
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: POSIX sockets and event loops
      • From: Eric Schlegel <email@hidden>
    • Re: POSIX sockets and event loops
      • From: "Duane Murphy" <email@hidden>
  • Prev by Date: Re: SCNetworkConnectionStart sometimes won't dial.
  • Next by Date: Re: POSIX sockets and event loops
  • Previous by thread: Re: Proper SMB URL format for FSMountServerVolumeSync?
  • Next by thread: Re: POSIX sockets and event loops
  • Index(es):
    • Date
    • Thread