| Deutsch English Français Italiano |
|
<vscb8b$2c0ne$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> Newsgroups: comp.lang.c++ Subject: Re: Pre-main construction order in modules Date: Sun, 30 Mar 2025 13:57:47 -0700 Organization: A noiseless patient Spider Lines: 16 Message-ID: <vscb8b$2c0ne$1@dont-email.me> References: <vsb12i$2mv42$1@dont-email.me> <vsbl21$1jsvi$1@dont-email.me> <vsbo2p$1p5ov$1@dont-email.me> <dTdGP.136957$cgs7.71710@fx14.ams4> <vsbqc2$1rk0n$1@dont-email.me> <48eGP.730204$J61.500281@fx08.ams4> <vsc0o9$2294v$2@raubtier-asyl.eternal-september.org> <5HfGP.241316$i41.190620@fx06.ams4> <vsc15c$22qfr$1@raubtier-asyl.eternal-september.org> <pLfGP.630914$Kb9a.52361@fx16.ams4> <vsc1b1$230rd$1@raubtier-asyl.eternal-september.org> <JPfGP.1508894$gHk7.1105564@fx17.ams4> <vsc1r1$23fpb$1@raubtier-asyl.eternal-september.org> <DXfGP.206189$Xb1.36076@fx05.ams4> <vsc8nl$2afmg$1@raubtier-asyl.eternal-september.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 30 Mar 2025 22:57:48 +0200 (CEST) Injection-Info: dont-email.me; posting-host="fb31161437cb09e11ca695b7d5812c51"; logging-data="2491118"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JrBs7MR+rxvuFjVo5uUfxRN93/SA+ARY=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:em4v4nZK6h7/ZNurEhNtwdwmoag= In-Reply-To: <vsc8nl$2afmg$1@raubtier-asyl.eternal-september.org> Content-Language: en-US Bytes: 2337 On 3/30/2025 1:15 PM, Bonita Montero wrote: > Am 30.03.2025 um 20:20 schrieb Mr Flibble: > >> But that is nevertheless what the Meyers Singleton involves. Static >> local >> initialisation has been threadsafe since C++11 and if performance is a >> concern then you can always cache the result in a reference downstream in >> any hot path that needs it. > > With current implemention all C++ runtimes govern all station initia- > lizations through a single mutex. That hurts if you have a constructor > that takes longer, maybe because of a socket-connection which the code > waits for. > Creating threads, socket-connections before main is a bad idea...? ;^o