mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-31 21:18:22 +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]]
|
||||
name = "OSTree.Sysroot"
|
||||
status = "generate"
|
||||
concurrency = "send"
|
||||
[[object.function]]
|
||||
name = "deploy_tree_with_options"
|
||||
[[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_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
|
||||
#[doc(alias = "journal-msg")]
|
||||
pub fn connect_journal_msg<F: Fn(&Self, &str) + '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) {
|
||||
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) + Send + 'static>(this: *mut ffi::OstreeSysroot, msg: *mut libc::c_char, f: glib::ffi::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
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 {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
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)
|
||||
from gir-files (@ a43b14381142)
|
||||
from gir-files (@ be0dbf02d770)
|
||||
|
@ -1,2 +1,2 @@
|
||||
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