Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
layer8
10mo ago
0 comments
Share
The problem is when C calls expect to be on a particular thread. Either the main event thread, in a GUI context, or the same thread as some related previous call.
0 comments
default
newest
oldest
ori_b
10mo ago
The problem is that C expects to have enough stack to put stuff there, but green threads allocate small stacks to reduce (virtual) memory use.
layer8
OP
10mo ago
That’s not a problem when a dedicated thread pool is used as mentioned by GP. However they don’t solve the thread affinity issue.
ori_b
10mo ago
That's the reason for the thread pool, and the resulting thread affinity issue.
layer8
OP
10mo ago
This seems to assume that the same green thread will always run on the same native thread, which I don’t think is universally the case.
2 more replies
j
/
k
navigate · click thread line to collapse