gstreamer: Require Send and not Sync for the values of an Array / List

`Sync` is more than required here: only sending of the values to another
thread is required.
This commit is contained in:
Sebastian Dröge 2022-03-08 14:46:13 +02:00
parent 1f7a0f29d9
commit b69043d462

View file

@ -653,7 +653,7 @@ unsafe impl Send for Array {}
unsafe impl Sync for Array {}
impl Array {
pub fn new(values: impl IntoIterator<Item = impl ToSendValue + Sync>) -> Self {
pub fn new(values: impl IntoIterator<Item = impl ToSendValue + Send>) -> Self {
assert_initialized_main_thread!();
Self(values.into_iter().map(|v| v.to_send_value()).collect())
@ -823,7 +823,7 @@ unsafe impl Send for List {}
unsafe impl Sync for List {}
impl List {
pub fn new(values: impl IntoIterator<Item = impl ToSendValue + Sync>) -> Self {
pub fn new(values: impl IntoIterator<Item = impl ToSendValue + Send>) -> Self {
assert_initialized_main_thread!();
Self(values.into_iter().map(|v| v.to_send_value()).collect())