Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: elaborate on async & threads interop #483

Open
kaspar030 opened this issue Oct 23, 2024 · 1 comment
Open

doc: elaborate on async & threads interop #483

kaspar030 opened this issue Oct 23, 2024 · 1 comment
Labels
docs Improvements or additions to documentation threading

Comments

@kaspar030
Copy link
Collaborator

There's a plethora of synchronization primitives in embassy, and some for our threading.
Threads can block_on() embassy (async) futures.

But, how can those be used for reasonable interactions? This needs documentation.

Ideas:

  • async impl on executor provides blocking impl for threads
    • provide blocking embedded-hal impls for threads that make use of the async variant within the executors
    • similar for embedded-nal
    • this would make threads really useful, as non-async code could seamlessly coexist with async code
  • do we need another channel that works for both threads and tasks?
  • which mutexes work, how do they interact? interrupt executor vs. thread executor? PIP?
  • ...
@kaspar030 kaspar030 added docs Improvements or additions to documentation threading labels Oct 23, 2024
@ROMemories
Copy link
Collaborator

Beginning of answer regarding mutexes here: #398 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation threading
Projects
None yet
Development

No branches or pull requests

2 participants