mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-03 05:18:24 +03:00
rust-bindings: Sysroot
is Send
I want to spawn tokio worker threads referencing sysroot objects in bootc. Just like the repo, there's nothing thread-local about it.
This commit is contained in:
parent
be0dbf02d7
commit
b00f27d476
@ -217,6 +217,7 @@ status = "generate"
|
|||||||
[[object]]
|
[[object]]
|
||||||
name = "OSTree.Sysroot"
|
name = "OSTree.Sysroot"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
concurrency = "send"
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "deploy_tree_with_options"
|
name = "deploy_tree_with_options"
|
||||||
[[object.function.parameter]]
|
[[object.function.parameter]]
|
||||||
|
6
rust-bindings/src/auto/sysroot.rs
generated
6
rust-bindings/src/auto/sysroot.rs
generated
@ -543,8 +543,8 @@ impl Sysroot {
|
|||||||
#[cfg(any(feature = "v2017_10", feature = "dox"))]
|
#[cfg(any(feature = "v2017_10", feature = "dox"))]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
|
||||||
#[doc(alias = "journal-msg")]
|
#[doc(alias = "journal-msg")]
|
||||||
pub fn connect_journal_msg<F: Fn(&Self, &str) + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_journal_msg<F: Fn(&Self, &str) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn journal_msg_trampoline<F: Fn(&Sysroot, &str) + 'static>(this: *mut ffi::OstreeSysroot, msg: *mut libc::c_char, f: glib::ffi::gpointer) {
|
unsafe extern "C" fn journal_msg_trampoline<F: Fn(&Sysroot, &str) + Send + 'static>(this: *mut ffi::OstreeSysroot, msg: *mut libc::c_char, f: glib::ffi::gpointer) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this), &glib::GString::from_glib_borrow(msg))
|
f(&from_glib_borrow(this), &glib::GString::from_glib_borrow(msg))
|
||||||
}
|
}
|
||||||
@ -556,6 +556,8 @@ impl Sysroot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsafe impl Send for Sysroot {}
|
||||||
|
|
||||||
impl fmt::Display for Sysroot {
|
impl fmt::Display for Sysroot {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
f.write_str("Sysroot")
|
f.write_str("Sysroot")
|
||||||
|
2
rust-bindings/src/auto/versions.txt
generated
2
rust-bindings/src/auto/versions.txt
generated
@ -1,2 +1,2 @@
|
|||||||
Generated by gir (https://github.com/gtk-rs/gir @ 0eeebbdf9d4d)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0eeebbdf9d4d)
|
||||||
from gir-files (@ a43b14381142)
|
from gir-files (@ be0dbf02d770)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
Generated by gir (https://github.com/gtk-rs/gir @ 0eeebbdf9d4d)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0eeebbdf9d4d)
|
||||||
from gir-files (@ a43b14381142)
|
from gir-files (@ be0dbf02d770)
|
||||||
|
Loading…
Reference in New Issue
Block a user