windows - Threads state after the program finishes execution -


what happens internal threads after main thread finishes execution?

e.g:

program 1 creates 5 threads run in background.
program 1 crashes.
threads alive?

they killed because threads bound in process context?

all resources linked process data structure. when process terminated windows ensures all resources cleaned-up.

didn't manage find references docs [feel free add some, sure read in m.russinovich "windows internals" book], here couple of similar answers regarding memory dealocations. thread clean part of clean routine windows call when process terminated.

https://stackoverflow.com/a/2975844/706456

https://stackoverflow.com/a/654766/706456


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -