Skip to content
Snippets Groups Projects
Commit 49da2638 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

feat: fiber::Builder::{start_non_joinable, defer_non_joinable}

parent d66d3e42
No related branches found
No related tags found
1 merge request!444Gmoshkin/fix fiber detach
......@@ -24,6 +24,10 @@
- `fiber::JoinHandle::wakeup` for waking up the fiber by it's join handle.
- `fiber::cancel` function for cancelling the fiber by id.
- `fiber::wakeup` function for waking up the fiber by id.
- `fiber::Builder::{start_non_joinable, defer_non_joinable}` functions for
spawning non-joinable fibers. These functions return the fiber id, if the
corresponding api is supported in your tarantool version. If not, you can use
`fiber::id`, which works on older versions by using lua api.
- `fiber::Cond::wait_deadline` for waiting until `tarantool::time::Instant`
rather than a `Duration`. Uses `fiber::clock` internally.
- `fiber::r#async::timeout::{deadline, IntoTimeout::deadline}` for constraining
......
......@@ -247,9 +247,9 @@ mod tests {
let cbus_endpoint = cbus::Endpoint::new(endpoint_name).unwrap();
cbus_endpoint.cbus_loop();
})
.start()
.start_non_joinable()
.expect("failed to start the cbus_fiber")
.detach()
.expect("fiber_id should be supported")
}
#[crate::test(tarantool = "crate")]
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment