I have this simple code in aspnet :assuming no exceptions nor file locking nor process terminates :
new Thread(()=>{
Thread.sleep(15000);
// GC.Collect();
File.Write (...); // dummy file
}).Start();
// GC.Collect();
From my tests , the file is always created.
Question
The scenario which is not understood to me is that the request lifetime is much shorter than thread execution and still it works . Thats all . Thats my main question
Is it always guaranteed that the file will be created ?
Nb it's just a test to examine behavior . Also the page is an empty page with only this code. Also i know that join will wait