zephyr::sync

Module channel

source
Expand description

Close-to-Zephyr channels

This module attempts to provide a mechanism as close as possible to crossbeam-channel as we can get, directly using Zephyr primitives.

The channels are built around k_queue in Zephyr. As is the case with most Zephyr types, these are typically statically allocated. Similar to the other close-to-zephyr primitives, this means that there is a constructor that can directly take one of these primitives.

In other words, zephyr::sys::Queue is a Rust friendly implementation of k_queue in Zephyr. This module provides Sender and Receiver, which can be cloned and behave as if they had an internal Arc inside them, but without the overhead of an actual Arc.

Structs§

Functions§

  • Create a multi-producer multi-consumer channel of unbounded capacity.
  • Create a multi-producer multi-consumer channel of unbounded capacity, using an existing Queue object.