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

Question: libdispatch alternative #28

Open
maxeeem opened this issue Jan 5, 2023 · 2 comments
Open

Question: libdispatch alternative #28

maxeeem opened this issue Jan 5, 2023 · 2 comments

Comments

@maxeeem
Copy link

maxeeem commented Jan 5, 2023

Hello 👋

I just got my SwiftIO Maker Kit yesterday and first off, thank you!

I'm relatively new to embedded development and my understanding is that libdispatch is not supported (based on this post). I have some project code that I would like to run on the board which uses dispatch queues, mainly to synchronize access to shared resources and for some async code. Do you have any suggestions or resources you can point me to on how I can adapt my code to the embedded use case without using Dispatch?

Thank you

@Ines333
Copy link
Member

Ines333 commented Feb 14, 2023

Hi @maxeeem,

Thanks for your kind support!

We are actually investigating this feature, to see if it’s possible to replace libdispatch directly at the Zephyr level. Plz stay tuned : )

@lhoward
Copy link
Contributor

lhoward commented Oct 4, 2023

Haven't looked into this in any detail, but a custom Executor that supported Zephyr work queues may be a more modern approach that integrates with Swift structured concurrency.

[1] https://github.com/apple/swift-evolution/blob/main/proposals/0392-custom-actor-executors.md#custom-actor-executors
[2] https://docs.zephyrproject.org/latest/kernel/services/threads/workqueue.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants