Skip to content

bus: Don't use the bus sync handler in the bus Stream to notify about messages being available

Sebastian Dröge requested to merge slomo/gstreamer-rs:bus-source-race-0.15 into 0.15

This is racy and can cause the consumer of the messages to never be woken up anymore:

  1. Waker is stored because no message on the bus
  2. Sync handler is called, waker is woken up
  3. Bus is polled again and no message is on it (yet), new waker is registered
  4. Bus stores the message from 2. in its queue (after the sync handler has returned BusSyncReply::Pass)
  5. No new message ever appears on the bus because all this happened for the very last message

Fixes #235 (closed)

Merge request reports

Loading