Skip to content

Commit

Permalink
[eclipse-iceoryx#528] Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Nov 26, 2024
1 parent d67b98e commit f584720
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
8 changes: 5 additions & 3 deletions iceoryx2/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@
//!
//! ## Simple Event Loop With Disabled [`Signal`](iceoryx2_bb_posix::signal::Signal) Handling
//!
//! This example demonstrates how the [`Node`] can be used when another instance is handling
//! system signals. The builder parameter [`NodeBuilder::signal_handling_mode()`] can be used
//! to disable signal handling in all [`Node`] calls like [`Node::wait()`].
//! This example demonstrates how the [`Node`](crate::node::Node) can be used when another instance is handling
//! system signals. The builder parameter
//! [`NodeBuilder::signal_handling_mode()`](crate::node::NodeBuilder::signal_handling_mode()) can be used
//! to disable signal handling in all [`Node`](crate::node::Node) calls like
//! [`Node::wait()`](crate::node::Node::wait()).
//!
//! ```no_run
//! use core::time::Duration;
Expand Down
17 changes: 11 additions & 6 deletions iceoryx2/src/port/waitset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,20 +185,22 @@
//! # }
//! ```
//!
//! ## Using [`WaitSet`] Without [`Signal`](iceoryx2_bb_posix::signal::Signal) Handling
//! ## Using [`WaitSet`](crate::port::waitset::WaitSet) Without [`Signal`](iceoryx2_bb_posix::signal::Signal) Handling
//!
//! This example demonstrates how the [`WaitSet`] can be used when another instance is handling
//! system signals. The builder parameter [`WaitSetBuilder::signal_handling_mode()`] can be used
//! to disable signal handling in all [`WaitSet`] calls like [`WaitSet::wait_and_process()`] or
//! [`WaitSet::wait_and_process_once()`].
//! This example demonstrates how the [`WaitSet`](crate::port::waitset::WaitSet) can be used when
//! another instance is handling system signals. The builder parameter
//! [`WaitSetBuilder::signal_handling_mode()`](crate::port::waitset::WaitSetBuilder::signal_handling_mode())
//! can be used to disable signal handling in all [`WaitSet`](crate::port::waitset::WaitSet) calls
//! like [`WaitSet::wait_and_process()`](crate::port::waitset::WaitSet::wait_and_process()) or
//! [`WaitSet::wait_and_process_once()`](crate::port::waitset::WaitSet::wait_and_process_once()).
//!
//! ```no_run
//! use iceoryx2::prelude::*;
//! # use core::time::Duration;
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//!
//! let waitset = WaitSetBuilder::new()
//! .signal_handling_mode(SignalHandlingMode::Dsiabled)
//! .signal_handling_mode(SignalHandlingMode::Disabled)
//! .create::<ipc::Service>()?;
//!
//! let on_event = |_| {
Expand All @@ -207,6 +209,9 @@
//! };
//!
//! waitset.wait_and_process(on_event)?;
//!
//! # Ok(())
//! # }

use std::{
cell::RefCell, collections::HashMap, fmt::Debug, hash::Hash, marker::PhantomData,
Expand Down

0 comments on commit f584720

Please sign in to comment.