[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:05:38.316000+00:00
Original source
not sure about this
Archived author: jackpoz • Posted: 2024-07-17T20:05:58.019000+00:00
Original source
is the thread ever cleaned up or does it clean up by itself ?
Archived author: Foe • Posted: 2024-07-17T20:06:13.862000+00:00
Original source
It clears itself when the function is finished executing, from my understanding
Archived author: jackpoz • Posted: 2024-07-17T20:06:47.326000+00:00
Original source
ElunaLoader::~ElunaLoader()
Archived author: jackpoz • Posted: 2024-07-17T20:07:11.236000+00:00
Original source
do you wait for the thread to be done before deleting ElunaLoader ?
Archived author: jackpoz • Posted: 2024-07-17T20:07:17.665000+00:00
Original source
or will you have a crash on shutdown ?
Archived author: Foe • Posted: 2024-07-17T20:08:24.139000+00:00
Original source
Good question, I haven't had any crashes so far during shutdown, but the thread only exists and runs for like 10 milliseconds, so I haven't really tried to time shutting down while it still exists
Archived author: Foe • Posted: 2024-07-17T20:10:04.857000+00:00
Original source
It would probably crash though I reckon, the other approach would be to have a worker and not detach from the thread right away, and wait for a stop signal
Archived author: jackpoz • Posted: 2024-07-17T20:10:49.047000+00:00
Original source
VS debugger has the "Threads" window where you can freeze and thaw threads
Archived author: jackpoz • Posted: 2024-07-17T20:11:11.465000+00:00
Original source
you can literally debug the reload, freeze, let worldserver shutdown, thaw the reload, see the crash happening