File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -519,10 +519,10 @@ where
519519 T : Send + ' static ,
520520 F : FnOnce ( ) -> T + Send + ' static ,
521521{
522- // use Cancellable::NONE as source obj to fulfill `Send` requirement
523- let task = unsafe { Task :: < bool > :: new ( Cancellable :: NONE , Cancellable :: NONE , |_, _| { } ) } ;
522+ // use a None GBinding as source obj to fulfill `Send` requirement
523+ let task = unsafe { Task :: < bool > :: new ( None :: < & glib :: Binding > , Cancellable :: NONE , |_, _| { } ) } ;
524524 let ( join, tx) = JoinHandle :: new ( ) ;
525- task. run_in_thread ( move |task, _: Option < & Cancellable > , _| {
525+ task. run_in_thread ( move |task, _: Option < & glib :: Binding > , _| {
526526 let res = panic:: catch_unwind ( panic:: AssertUnwindSafe ( func) ) ;
527527 let _ = tx. send ( res) ;
528528 unsafe { ffi:: g_task_return_pointer ( task. to_glib_none ( ) . 0 , ptr:: null_mut ( ) , None ) }
You can’t perform that action at this time.
0 commit comments