From: Uli Schlachter Date: Mon, 24 Sep 2012 20:07:51 +0000 (+0200) Subject: Fix a multi-thread deadlock X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23911a707b8845bff52cd7853fc5d59fb0823cef;hp=23911a707b8845bff52cd7853fc5d59fb0823cef;p=free-sw%2Fxcb%2Flibxcb Fix a multi-thread deadlock This fixes a deadlock which was seen in-the-wild with wine. It could happen that two threads tried to read from the socket at the same time and one of the thread got stuck inside of poll()/select(). The fix works by making sure that the writing thread doesn't steal the reading thread's reply. Debugged-by: Erich Hoover Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54671 Signed-off-by: Uli Schlachter ---