File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
examples/gio_task/file_size Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ pub unsafe extern "C" fn my_file_size_get_file_size_async(
3131 closure,
3232 ) ;
3333
34- glib:: MainContext :: default ( ) . spawn_local ( async move {
34+ glib:: MainContext :: ref_thread_default ( ) . spawn_local ( async move {
3535 let size = gio:: File :: for_path ( "Cargo.toml" )
3636 . query_info_future ( "*" , gio:: FileQueryInfoFlags :: NONE , glib:: PRIORITY_DEFAULT )
3737 . await
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ impl FileSize {
3939 )
4040 } ;
4141
42- glib:: MainContext :: default ( ) . spawn_local ( async move {
42+ glib:: MainContext :: ref_thread_default ( ) . spawn_local ( async move {
4343 let size = gio:: File :: for_path ( "Cargo.toml" )
4444 . query_info_future ( "*" , gio:: FileQueryInfoFlags :: NONE , glib:: PRIORITY_DEFAULT )
4545 . await
You can’t perform that action at this time.
0 commit comments