Are kqueue events "round robin"?
Are kqueue events "round robin"?
- Subject: Are kqueue events "round robin"?
- From: Påhl Melin <email@hidden>
- Date: Thu, 2 Apr 2009 17:07:59 +0200
Hi all,
I have a question regarding the order events are returned from a
kevent() call on a kqueue, if I only supply one event in the event
list and no events are changed? Is there a predefined order in which
the filters are processed and returned as events when there are
multiple events available at the same time?
For example if I have two filters, one EVFILT_READ filter and one
EVFILT_WRITE filter and there is available room in both the read and
the write buffers. If I make four subsequent calls, in what order will
the events be returned? Will I get EVFILT_READ, EVFILT_WRITE,
EVFILT_READ, EVFILT_WRITE? Or will I e.g. get one of the events
repeatedly until that buffer is empty/full, like EVFILT_READ until I
have read everything in the read buffer? Or is random or some other
algorithm?
What I want to do is to alternate between read and write events to get
good responsiveness. I suppose I could change the events in the kqueue
but it would be easier to rely on some guaranteed behavior.
Thanks in advance,
/ Påhl
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden