4 ms·
> I'd say you shouldn't be calling setenv() at all once you've spawned threads. That's why I hate ZeroMQ. They spawn threads and do magics behind your back.
by j16sdiz 3y ago
> I'd say you shouldn't be calling setenv() at all once you've spawned threads.
That's why I hate ZeroMQ. They spawn threads and do magics behind your back.
- another2another 3y agoZeroMQ is a big abstraction over sockets. The higher the level of abstractions, the more these things are usually necessary. If you're using a library like that it comes with the territory, and you have to decide for yourself the cost-benefit of using non blocking sockets and async io yourself, or trust a library. Much more fun to write these things yourself sometimes, but I find e.g. libevent a nice somewhere-in-between abstraction level I can be happy with.
- gpderetta 3y agoSure, but library that spawn threads are a pain. It is convenient for the library writer but it always end up being a significant inconvenience for the user.