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(
31
31
closure,
32
32
) ;
33
33
34
- glib:: MainContext :: default ( ) . spawn_local ( async move {
34
+ glib:: MainContext :: ref_thread_default ( ) . spawn_local ( async move {
35
35
let size = gio:: File :: for_path ( "Cargo.toml" )
36
36
. query_info_future ( "*" , gio:: FileQueryInfoFlags :: NONE , glib:: PRIORITY_DEFAULT )
37
37
. await
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ impl FileSize {
39
39
)
40
40
} ;
41
41
42
- glib:: MainContext :: default ( ) . spawn_local ( async move {
42
+ glib:: MainContext :: ref_thread_default ( ) . spawn_local ( async move {
43
43
let size = gio:: File :: for_path ( "Cargo.toml" )
44
44
. query_info_future ( "*" , gio:: FileQueryInfoFlags :: NONE , glib:: PRIORITY_DEFAULT )
45
45
. await
You can’t perform that action at this time.
0 commit comments