-
Notifications
You must be signed in to change notification settings - Fork 11
Add synchronization primitives #6
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
Conversation
Nim 1.4 lacks broadcast so thats why the barrier test fail. |
So add a version check for these tests or better yet a |
Is porting C++ primitives https://github.com/llvm/llvm-project/blob/main/libcxx/include/semaphore doable? I think the lock based semaphore is overly restrictive, however I am not even sure that code can be ported over different compilers/OSes. |
I only skimmed the C++ code but it looks doable. |
My issue is atomic.wait_all which is platform depended. Implemented with futexes under linux. If someone figures the hard part, then the rest are easy. |
|
What is the status of this? I know that there is https://github.com/planetis-m/sync, but I think it would still be useful to have some more synchronization primitives here. |
Please split up this PR. |
Sorry I don't have any available time to modernize and split this PR. |
superseeded by #47 |
Examples are kept in a separate folder, although Im thinking of making them later runnableExamples. All but the spinlock depend on std/locks