0

Let's say I have 2 sockets I am watching for events and I really want socket 1 to be preferred (event at the cost of starving socket 2). How would I do that with libuv ?

As an example when working with libevent one can use :

int event_priority_set(struct event *event, int priority);

When multiple events of multiple priorities become active, the low-priority events are not run. Instead, Libevent runs the high priority events, then checks for events again. Only when no high-priority events are active are the low-priority events run.

Alex Garcia
  • 773
  • 7
  • 21

1 Answers1

1

There is no way to do that in libuv. In libuv there is no abstraction for an event (so no struct event or some equivalent stuff), all i/o callbacks are dispatched as they happen.

saghul
  • 1,990
  • 1
  • 13
  • 15