Skip to content

Commit e291e45

Browse files
committed
Remove crossbeam dependency by replacing soft-depricated crossbeam::thread::scope with std::thread::scope
Signed-off-by: Ludvig Liljenberg <[email protected]>
1 parent 668a824 commit e291e45

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

Cargo.lock

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/hyperlight_host/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ tracing-log = "0.2.0"
3737
tracing-core = "0.1.34"
3838
hyperlight-common = { workspace = true, default-features = true, features = [ "std" ] }
3939
vmm-sys-util = "0.14.0"
40-
crossbeam = "0.8.0"
4140
crossbeam-channel = "0.5.15"
4241
thiserror = "2.0.12"
4342
chrono = { version = "0.4", optional = true }

src/hyperlight_host/src/sandbox/host_funcs.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,15 @@ fn maybe_with_seccomp<T: Send>(
159159
syscalls: Option<&[ExtraAllowedSyscall]>,
160160
f: impl FnOnce() -> Result<T> + Send,
161161
) -> Result<T> {
162+
use std::thread;
163+
162164
use crate::seccomp::guest::get_seccomp_filter_for_host_function_worker_thread;
163165

164166
// Use a scoped thread so that we can pass around references without having to clone them.
165-
crossbeam::thread::scope(|s| {
166-
s.builder()
167+
thread::scope(|s| {
168+
thread::Builder::new()
167169
.name(format!("Host Function Worker Thread for: {name:?}"))
168-
.spawn(move |_| {
170+
.spawn_scoped(s, move || {
169171
let seccomp_filter = get_seccomp_filter_for_host_function_worker_thread(syscalls)?;
170172
seccomp_filter
171173
.iter()
@@ -194,7 +196,6 @@ fn maybe_with_seccomp<T: Send>(
194196
.join()
195197
.map_err(|_| new_error!("Error joining thread executing host function"))?
196198
})
197-
.map_err(|_| new_error!("Error joining thread executing host function"))?
198199
}
199200

200201
#[cfg(not(all(feature = "seccomp", target_os = "linux")))]

0 commit comments

Comments
 (0)