glwindow/win32: Don't use condition variables for message synchronization
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 11 Mar 2019 11:29:36 +0000 (16:59 +0530)
committerMatthew Waters <matthew@centricular.com>
Tue, 12 Mar 2019 03:21:57 +0000 (03:21 +0000)
commit045137d34065f5969d5edad4724152ad7a569b3e
tree226de62a79c98f062d48b9734467664d4d358e6a
parent36ec18c2307cfee7e5ae495c132cf047886508f5
glwindow/win32: Don't use condition variables for message synchronization

Using a single condition variable for synchronization across all GL
messages is very slow on Windows and uses up to 20% CPU usage in some
workloads due to lock contention and false broadcasts.

Using per-message event handles reduces the CPU usage to negligible
amounts despite having to allocate a new event handle for each
message.
gst-libs/gst/gl/win32/gstglwindow_win32.c