GNOME Bugzilla – Bug 796895
pad: Ensure that the pad is blocked for IDLE probes if they are called from the streaming thread too
Last modified: 2018-08-02 07:59:23 UTC
See commit message
Created attachment 373221 [details] [review] pad: Ensure that the pad is blocked for IDLE probes if they are called from the streaming thread too IDLE probes that are directly called when being added will increase / decrease the "number of IDLE probes running" counter around the call, but when running from the streaming thread this won't happen. This has the effect that when running from a streaming thread it is possible to push serialized events or data out of the pad without problems, but otherwise it would deadlock because serialized data would wait for the IDLE probe to finish first (it is blocking after all!). With this change it will now always consistently deadlock instead of just every once in a while, which should make it obvious why this happens and prevent racy deadlocks in application code.
should we be adding anything to the docs somewhere about what's not ok to do from an IDLE probe then? e.g. to the IDLE flag docs?
IMHO that's already clear from the docs, it's a blocking probe. It was surprising for me that it actually worked, it was an accident that I ran into this :)
Attachment 373221 [details] pushed as c3d3cf0 - pad: Ensure that the pad is blocked for IDLE probes if they are called from the streaming thread too