wr
hn
Top
New
Best
Ask
Show
Jobs
Back
r
rkaehn
Joined 2 years ago
Karma
39
Submissions
5
Member since
Jan 13
View on Hacker News
Recent submissions
Comment · 2 years ago
Regarding the footnote about the temperature encoding: it seems to be Gray code
Comment · 2 years ago
The tasks themselves come from a pool and are reused automatically, so no call to `free` is needed there. As for the executor, destroying it is a bit involved, because you need to wait for the currently executed task to finish before joining the threads and releasing the resources. It is a feature I do want to work on in the future though.
Comment · 2 years ago
The library is an "stb-style" header-only library, so the header has two modes: when you define CR_TASK_IMPL, it includes the implementation (starting from line 20), otherwise it just includes declarations (the first 19 lines). The implementation should only be included in one translation unit, but the declarations can be included in multiple units.
Show HN: Async tasks in 350 lines of C
g
github.com
146
rkaehn
2 years ago
52
comments