10.01.2013 16:52, Max Kellermann пишет:
> I'm not yet sure if we will need this.  The next big step is
> eliminating the GLib event loop.  I wouldn't like to reimplement this
> from scratch, rather use libevent (which I have been using a lot in
> other projects), but I'm not sure how portable libevent really is.

There is libev also (not sure which one is better).

One thing I really dislike in current event loop is how event_pipe (or 
GlobalEvents in master) works on Windows.

Windows does not support select()/poll()/etc on pipes.
GLib emulates polling using separate reader/writer thread.
This is a significant overhead IMO considering what event_pipe is used for.

The most straightforward implementation is to use Win32 events.
However this requires an event loop that does polling using 
WaitForMultipleObjects() function instead of select(). Likely this is 
not possible with libevent/libev but needs checking.

Probably separate socket pair could be used instead of pipe. This would 
at least eliminate extra-thread.

-- 
Denis

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to