[sheepdog] [PATCH v2 1/2] lib: prioritize events for epoll() and enhance event loop
h.mitake at gmail.com
Sat Dec 22 19:06:50 CET 2012
At Sat, 22 Dec 2012 02:00:04 +0800,
Liu Yuan wrote:
> On 12/22/2012 01:23 AM, Hitoshi Mitake wrote:
> > - ei = (struct event_info *)events[i].data.ptr;
> > - ei->handler(ei->fd, events[i].events, ei->data);
> > + case EVENT_LOOP_RETRIEVE:
> > + goto retrieve;
> Simply go retrieve, won't this drop the already raised events in hands?
Yes. It is intentional. Because there is no way to detect newly coming
events without epoll_wait().
> and you forgot the add description for EVENT_LOOP_XXX in source
Sorry, I'll write the description in the next version.
> Maybe you can write another prio_event_loop()? Then sheep calls
> event_loop() and keeper calls prio_event_loop() might be better way.
OK, I'll seek other ways like prio_event_loop().
More information about the sheepdog