| ▲ | halayli 3 hours ago | |
a real human. threads can exist before main() starts. for example, you can include another tu which happens to launch a thread and call instance(). Singletons used to be a headache before C++11 and it was common(maybe still is) to see macros in projects that expand to a singleton class definition to avoid common pitfalls. | ||
| ▲ | MaulingMonkey an hour ago | parent [-] | |
In fact, Windows 10+ now uses a thread pool during process init well before main is reached. https://web.archive.org/web/20200920132133/https://blogs.bla... | ||