3 ms·
> the moment you link against any 3rd-party library, you program can have arbitrarily many threads before it even reaches main(). what?! name one library that
by grayhatter 3y ago
> the moment you link against any 3rd-party library, you program can have arbitrarily many threads before it even reaches main().
what?! name one library that does this?
- aidenn0 3y agoI think the C++ version of the zeromq library could initialize a context in a static initializer, and zmq contexts involve creating a thread.
- grayhatter 3y agohttps://zeromq.org/get-started/?language=cpp# https://zeromq.org/get-started/?language=cpp# there's 5 listed for c++ which one creates threads before main()?
- aidenn0 3y agoIt's been a long time, so I might be wrong, but with zmqpp[1] make a global zmqpp::context and I believe it will create threads before main(). 1: https://github.com/zeromq/zmqpp https://github.com/zeromq/zmqpp
- slaymaker1907 3y agoWindows will have a few threads for doing IO at program startup.
- gammalost 3y agoI've done some work with golang. Do not know if the libraries I used were bad, but they did some nasty things before main. Some even saw it as okay to call panic