Skip to content

gl: wrapper for the gst_gl_context_thread_add function

The function is marked as FnOnce() + Send + Sync, which I believe is correct, since the purpose of the function is to send the function across thread boundaries.

In C code the user_data is often used to send fx. error notifications back to the calling thread, so as I understand it the Sync marker is also correct for this.

Regarding safety, then the Box wrapping the closure is converted to raw, and then revived inside the trampoline function, where it will be dropped when it goes out of scope.

Merge request reports