[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] WaitForMultipleObjects backend?



I was perusing whatsnew-2.0.txt and saw:

  Libevent 2.1 may add a multithreaded WaitForMultipleEvents-based
  backend for better performance with many inactive sockets and better
  integration with Windows events.

Although that hasn't been added yet, I was wondering if anyone had thought about it, and had any suggestions on how hard writing such a backend would be, or how best to approach it.

I have some existing code which uses WaitForMultipleObjects to wait on a combination of sockets and "manual reset events" created with CreateEvent(). I'd like to port this code to libevent, but I'm not sure how to handle the manual reset events. It seems like the "correct" solution would be to write a new backend as suggested in whatsnew-2.0.txt, but I'm not sure how big of a project I'd be getting myself into if I set out to do that. Any other approach I can think of feels like a horrible hack, though. (Such as having a separate thread to do WaitForMultipleObjects on the manual reset events, and then write a byte to a socketpair that libevent is waiting on.)

Any thoughts/suggestions?

--Patrick

***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.