Skip to content

Commit 9266ddd

Browse files
sdroegebilelmoussaoui
authored andcommitted
glib: Add missing Send bound to the output type of the spawn_from_within() future
1 parent 14ebb28 commit 9266ddd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

glib/src/main_context_futures.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ impl MainContext {
580580
/// The given `Future` does not have to be `Send` but the closure to spawn it has to be.
581581
///
582582
/// This can be called only from any thread.
583-
pub fn spawn_from_within<R: 'static, F: Future<Output = R> + 'static>(
583+
pub fn spawn_from_within<R: Send + 'static, F: Future<Output = R> + 'static>(
584584
&self,
585585
func: impl FnOnce() -> F + Send + 'static,
586586
) -> SpawnWithinJoinHandle<R> {
@@ -593,7 +593,7 @@ impl MainContext {
593593
/// The given `Future` does not have to be `Send` but the closure to spawn it has to be.
594594
///
595595
/// This can be called only from any thread.
596-
pub fn spawn_from_within_with_priority<R: 'static, F: Future<Output = R> + 'static>(
596+
pub fn spawn_from_within_with_priority<R: Send + 'static, F: Future<Output = R> + 'static>(
597597
&self,
598598
priority: Priority,
599599
func: impl FnOnce() -> F + Send + 'static,

0 commit comments

Comments
 (0)