[DiscordArchive] how many threads can update _cacheState ? 1 or more ?
[DiscordArchive] how many threads can update _cacheState ? 1 or more ?
Archived author: jackpoz • Posted: 2024-07-17T20:11:23.062000+00:00
Original source
or add a Sleep(30 seconds) and shutdown
Archived author: Foe • Posted: 2024-07-17T20:11:29.648000+00:00
Original source
yeah, it probably would crash
Archived author: jackpoz • Posted: 2024-07-17T20:11:47.244000+00:00
Original source
then you have TSan for race conditions, ASan for memory leaks
Archived author: jackpoz • Posted: 2024-07-17T20:12:16.298000+00:00
Original source
https://en.cppreference.com/w/cpp/thread/thread/detach "Any allocated resources will be freed once the thread exits." seems like what you said, no leaks
[Embed: cpp/thread/thread/detach]
https://en.cppreference.com/w/cpp/thread/thread/detach
Archived author: jackpoz • Posted: 2024-07-17T20:12:48.043000+00:00
Original source
but you probably want to store the thread and wait for it to finish
Archived author: jackpoz • Posted: 2024-07-17T20:12:55.593000+00:00
Original source
in the dtor
Archived author: jackpoz • Posted: 2024-07-17T20:13:33.130000+00:00
Original source
does TC use a lot of threads ? otherwise there's boost
Archived author: Foe • Posted: 2024-07-17T20:13:40.416000+00:00
Original source
It uses some
Archived author: Tea • Posted: 2024-07-17T20:13:43.976000+00:00
Original source
i wouldnt even create a thread manually
Archived author: Tea • Posted: 2024-07-17T20:13:54.820000+00:00
Original source
use this instead https://en.cppreference.com/w/cpp/thread/async
[Embed: cpp/thread/async]
https://en.cppreference.com/w/cpp/thread/async