gpui: Use async-task 4.7
This commit is contained in:
parent
3e6b4a1298
commit
a984a158fc
4 changed files with 9 additions and 9 deletions
5
Cargo.lock
generated
5
Cargo.lock
generated
|
@ -576,8 +576,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-task"
|
name = "async-task"
|
||||||
version = "4.0.3"
|
version = "4.7.0"
|
||||||
source = "git+https://github.com/zed-industries/async-task?rev=341b57d6de98cdfd7b418567b8de2022ca993a6e#341b57d6de98cdfd7b418567b8de2022ca993a6e"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-tls"
|
name = "async-tls"
|
||||||
|
|
|
@ -164,7 +164,6 @@ tree-sitter-uiua = {git = "https://github.com/shnarazk/tree-sitter-uiua", rev =
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "31c40449749c4263a91a43593831b82229049a4c" }
|
tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "31c40449749c4263a91a43593831b82229049a4c" }
|
||||||
async-task = { git = "https://github.com/zed-industries/async-task", rev = "341b57d6de98cdfd7b418567b8de2022ca993a6e" }
|
|
||||||
# wasmtime = { git = "https://github.com/bytecodealliance/wasmtime", rev = "v16.0.0" }
|
# wasmtime = { git = "https://github.com/bytecodealliance/wasmtime", rev = "v16.0.0" }
|
||||||
|
|
||||||
# TODO - Remove when a version is released with this PR: https://github.com/servo/core-foundation-rs/pull/457
|
# TODO - Remove when a version is released with this PR: https://github.com/servo/core-foundation-rs/pull/457
|
||||||
|
|
|
@ -19,7 +19,7 @@ gpui_macros = { path = "../gpui_macros" }
|
||||||
util = { path = "../util" }
|
util = { path = "../util" }
|
||||||
sum_tree = { path = "../sum_tree" }
|
sum_tree = { path = "../sum_tree" }
|
||||||
sqlez = { path = "../sqlez" }
|
sqlez = { path = "../sqlez" }
|
||||||
async-task = "4.0.3"
|
async-task = "4.7"
|
||||||
backtrace = { version = "0.3", optional = true }
|
backtrace = { version = "0.3", optional = true }
|
||||||
ctor.workspace = true
|
ctor.workspace = true
|
||||||
linkme = "0.3"
|
linkme = "0.3"
|
||||||
|
|
|
@ -11,7 +11,7 @@ use objc::{
|
||||||
};
|
};
|
||||||
use parking::{Parker, Unparker};
|
use parking::{Parker, Unparker};
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use std::{ffi::c_void, sync::Arc, time::Duration};
|
use std::{ffi::c_void, ptr::NonNull, sync::Arc, time::Duration};
|
||||||
|
|
||||||
include!(concat!(env!("OUT_DIR"), "/dispatch_sys.rs"));
|
include!(concat!(env!("OUT_DIR"), "/dispatch_sys.rs"));
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ impl PlatformDispatcher for MacDispatcher {
|
||||||
unsafe {
|
unsafe {
|
||||||
dispatch_async_f(
|
dispatch_async_f(
|
||||||
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT.try_into().unwrap(), 0),
|
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT.try_into().unwrap(), 0),
|
||||||
runnable.into_raw() as *mut c_void,
|
runnable.into_raw().as_ptr() as *mut c_void,
|
||||||
Some(trampoline),
|
Some(trampoline),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ impl PlatformDispatcher for MacDispatcher {
|
||||||
unsafe {
|
unsafe {
|
||||||
dispatch_async_f(
|
dispatch_async_f(
|
||||||
dispatch_get_main_queue(),
|
dispatch_get_main_queue(),
|
||||||
runnable.into_raw() as *mut c_void,
|
runnable.into_raw().as_ptr() as *mut c_void,
|
||||||
Some(trampoline),
|
Some(trampoline),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ impl PlatformDispatcher for MacDispatcher {
|
||||||
dispatch_after_f(
|
dispatch_after_f(
|
||||||
when,
|
when,
|
||||||
queue,
|
queue,
|
||||||
runnable.into_raw() as *mut c_void,
|
runnable.into_raw().as_ptr() as *mut c_void,
|
||||||
Some(trampoline),
|
Some(trampoline),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,6 @@ impl PlatformDispatcher for MacDispatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" fn trampoline(runnable: *mut c_void) {
|
extern "C" fn trampoline(runnable: *mut c_void) {
|
||||||
let task = unsafe { Runnable::from_raw(runnable as *mut ()) };
|
let task = unsafe { Runnable::<()>::from_raw(NonNull::new_unchecked(runnable as *mut ())) };
|
||||||
task.run();
|
task.run();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue