aboutsummaryrefslogtreecommitdiff
path: root/embassy-sync/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1763 from rubdos/sender-receiver-with-ctxDario Nieuwenhuis2023-08-221-54/+136
|\ | | | | | | Refactor Channel/Sender/Receiver poll methods
| * Deprecate *recv* in favor of *receive*Ruben De Smet2023-08-221-44/+44
| |
| * Implement Channel::poll_receive(..) -> Poll<T>Ruben De Smet2023-08-111-4/+39
| |
| * Channel poll methods return Poll instead of boolRuben De Smet2023-08-111-14/+22
| |
| * Expose poll_ready_to_{send,receive} in Sender/ReceiverRuben De Smet2023-08-111-0/+39
| |
* | Fix typoDániel Buga2023-08-151-1/+1
|/
* embassy-sync: manual Copy impls for channel and pipeSam Lakerveld2023-08-082-6/+12
|
* Update to embedded-io 0.5 (#1752)Dario Nieuwenhuis2023-08-071-10/+10
|
* wpan: fully implement initial draft conceptxoviat2023-07-181-0/+22
|
* sync/pipe: fix doc typos.Dario Nieuwenhuis2023-06-271-2/+2
|
* fmt: remove unused defmt::timestamp!Dario Nieuwenhuis2023-06-091-3/+0
|
* sync/pipe: write all user data to pipeZhangYong2023-06-041-0/+10
| | | | sync/pipe: add write_all function
* sync: do will_wake check in MultiWakerRegistration.Dario Nieuwenhuis2023-05-262-43/+40
|
* Update Rust nightly.Dario Nieuwenhuis2023-05-191-1/+0
|
* executor,sync: add support for turbo-wakers.Dario Nieuwenhuis2023-03-304-42/+77
| | | | | | | | | | | | | | | | | | | | | | | | This is a `core` patch to make wakers 1 word (the task pointer) instead of 2 (task pointer + vtable). It allows having the "waker optimization" we had a while back on `WakerRegistration/AtomicWaker`, but EVERYWHERE, without patching all crates. Advantages: - Less memory usage. - Faster. - `AtomicWaker` can actually use atomics to load/store the waker, No critical section needed. - No `dyn` call, which means `cargo-call-stack` can now see through wakes. Disadvantages: - You have to patch `core`... - Breaks all executors and other things that create wakers, unless they opt in to using the new `from_ptr` API. How to use: - Run this shell script to patch `core`. https://gist.github.com/Dirbaio/c67da7cf318515181539122c9d32b395 - Enable `build-std` - Enable `build-std-features = core/turbowakers` - Enable feature `turbowakers` in `embassy-executor`, `embassy-sync`. - Make sure you have no other crate creating wakers other than `embassy-executor`. These will panic at runtime. Note that the patched `core` is equivalent to the unpached one when the `turbowakers` feature is not enabled, so it should be fine to leave it there.
* sync/pipe: update to clarify docs that it is byte-oriented.Dario Nieuwenhuis2023-03-261-28/+43
| | | | | There was some language copypasted from Channel talking about "messages" or "values", that is not really accurate with Pipe.
* perf(pubsub): Skip clone on last messageRasmus Melchior Jacobsen2023-03-211-4/+28
|
* fix(pubsub): Pop messages which count is 0 after unsubscribeRasmus Melchior Jacobsen2023-03-151-0/+47
|
* Add `#[must_use]` to all futuresGrant Miller2023-02-242-0/+6
|
* sync: Fix nightly feature compilation after upgrade to embedded-io 0.4.0Gabriel Smith2022-11-272-57/+20
|
* sync/signal: Implement Default for SignalMatt Johnston2022-11-221-0/+9
|
* Derive Default for WakerRegistrationMatt Johnston2022-11-061-1/+1
| | | | This simplifies creating arrays of WakerRegistrations
* Update Rust nightly.Dario Nieuwenhuis2022-10-261-9/+9
|
* Forgot to add space function to immediate publisherDion Dokter2022-10-051-0/+8
|
* Went back to named futures but now with must_useDion Dokter2022-09-293-7/+8
|
* Futures in pub & sub are now awaited instead of returned for better user ↵Dion Dokter2022-09-293-5/+92
| | | | | | compiler diagnostics. Added functions for reading how many messages are available
* Remove default, reorder generic paramsivmarkov2022-09-251-9/+10
|
* Remove default, reorder generic paramsivmarkov2022-09-241-1/+0
|
* Parameterize Signal with RawMutexivmarkov2022-09-241-28/+41
|
* Replace futures::future::poll_fn -> core::future::poll_fn.Dario Nieuwenhuis2022-09-222-4/+3
|
* Update Rust nightly.Dario Nieuwenhuis2022-09-221-1/+1
| | | | Removes feature(generic_associated_types)
* Make rustfmt happyJoakim Hulthe2022-09-161-1/+3
|
* Add .into_inner() and .get_mut() to MutexJoakim Hulthe2022-09-161-0/+14
|
* sync/signal: wake old waker on overflow instead of panicking.Dario Nieuwenhuis2022-09-121-1/+5
| | | | | | This makes behavior consistent with `WakerRegistration`. It allows canceling `wait` in one task and then calling `wait` in another. If two tasks are `wait`ing concurrently the signal will be received by only one of them, randomly.
* Add README for embassy-syncUlf Lilleengen2022-08-231-1/+1
|
* Fix warnings after crate splitUlf Lilleengen2022-08-231-2/+2
|
* sync: flatten module structure.Dario Nieuwenhuis2022-08-227-9/+6
|
* split `embassy-util` into `embassy-futures`, `embassy-sync`.Dario Nieuwenhuis2022-08-2216-0/+3156