3 ms·
C integration is the killer for N:M threading. C libraries do blocking IO, are not wrapped into a VM, are not compiled for segmented stacks, use thread-local st
by qznc 13y ago
C integration is the killer for N:M threading. C libraries do blocking IO, are not wrapped into a VM, are not compiled for segmented stacks, use thread-local storage, etc. You can work around this problems, which increases complexity. For close C integration, you are basically forced to adopt Cs view of threading.
- jlouis 13y agoThis is why the R17 release of Erlang might get "dirty schedulers" for this kind of work. Essentially it gives you background thread pools where such work can be carried out. Currently, you can call C functions directly, but it is not meant for long-running tasks which can block and so on.
- wcummings 13y agoIf E17 includes this AND maps I might cry (':