3 ms·
Looks exactly like one would expect it to. Clear, boring C. Good stuff. C11 has a <threads> header that should be usable in place of the pthreads api.
by JonChesterfield 3y ago
Looks exactly like one would expect it to. Clear, boring C. Good stuff.
C11 has a <threads> header that should be usable in place of the pthreads api.
- LoganDark 3y agoI expected it to include yielding, but I'm actually glad it doesn't. This looks like a good base layer to build higher-level abstractions on. Useful stuff.
- LoganDark 3y agoFWIW, I opened a PR that adds Windows support: https://github.com/rkaehn/cr_task.h/pull/2 https://github.com/rkaehn/cr_task.h/pull/2 I may play with the C11-standard `threads.h`, but note that it was not implemented by MSVC at all until quite recently: https://devblogs.microsoft.com/cppblog/c11-threads-in-visual-studio-2022-version-17-8-preview-2/ https://devblogs.microsoft.com/cppblog/c11-threads-in-visual... Edit: Made a C11 threads.h implementation as well. https://github.com/rkaehn/cr_task.h/pull/3 https://github.com/rkaehn/cr_task.h/pull/3