Skip to content

Commit 759ebc6

Browse files
committed
Upgrade dependencies
1 parent a9c57d7 commit 759ebc6

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ log = "0.4"
1717
mach2 = "0.6.0"
1818

1919
[target.'cfg(windows)'.dependencies]
20-
windows-sys = { version = "0.52.0", features = [
20+
windows-sys = { version = "0.61", features = [
2121
"Win32_Foundation",
2222
"Win32_System_Diagnostics_Debug",
2323
"Win32_System_Threading",

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,12 @@ mod platform {
403403
pub type Pid = u32;
404404
#[derive(Eq, PartialEq, Hash)]
405405
struct ProcessHandleInner(HANDLE);
406+
407+
// A HANDLE is an index into the process-wide kernel handle table rather than
408+
// an address, so it stays valid on any thread
409+
unsafe impl Send for ProcessHandleInner {}
410+
unsafe impl Sync for ProcessHandleInner {}
411+
406412
/// On Windows a `ProcessHandle` is a `HANDLE`.
407413
#[derive(Clone, Eq, PartialEq, Hash)]
408414
pub struct ProcessHandle(Arc<ProcessHandleInner>);

0 commit comments

Comments
 (0)