[quagga-dev 11565] Re: add possibility to use poll instead of select

Paul Jakma paul at jakma.org
Wed Oct 8 11:05:39 BST 2014


On Tue, 8 Apr 2014, David Lamparter wrote:

> Stupidly enough, the thread_* functions are woven into most other things 
> like ZAPI & the CLI, making it hard to use libzebra in an outside 
> project that uses another mainloop...

Well, GNU Zebra was started in the early 90s. I think it predates most 
well-known mainloop libraries! So I don't think it was a bad choice at the 
time. I don't think the GNU Zebra event loop is that bad either.

In the near-term the best solution is probably to extend thread.h to allow 
it to integrate with other mainloops, if there's demand. E.g. 
wrapper/shims to register timers, fds, etc., with other mainloops, and 
allow those to manage scheduling and/or shims to take over scheduling from 
other mainloops.

I had a look at libevent once. Personally I think I suspect it'd be a lot 
less work to borrow/reimplement whatever nice stuff it might happen to 
have that we lack, than convert Quagga over to it.

It might even be an idea to get back to properly libifying the core 
mainloop and attendent bits, given it seems to be recognised we're going 
to be using it for at least a while (so which probably means "for a long 
while yet"). ;)

regards,
-- 
Paul Jakma	paul at jakma.org	@pjakma	Key ID: 64A2FF6A
Fortune:
You will be audited by the Internal Revenue Service.




More information about the Quagga-dev mailing list