POSIX sockets and event loops
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.