Timothe Litt via curl-library <[email protected]> wrote: > On 16-Nov-21 17:24, Daniel Stenberg via curl-library wrote: > > > On Tue, 16 Nov 2021, Woody wrote: > > > >> In case of error, couldn't we somehow "detach" the thread instead of > >> skipping the join()? Would it not be cleaner? > > > > I suppose this is where my inexperience with thread programming shines > > through, but yes, I think that sounds exactly what we need! > > > If you detach a thread, you need to take care that it doesn't hold any > pointers to stack or heap variables in the parent that might be deallocated > before the detached thread terminates. If you miss this, you end up with a > (usually difficult to debug) bit spray. > ... > Fixing this would be a good thing, but care is required to ensure that the > cure isn't worse than the disease.
In the next days I'm going to look into the code to see where the thread is created and look for a way to cleanly detach it (at least I will try to understand if it's possible without a mighty effort). I'll keep you informed. -- Best regards. Woody from WiBu Systems AG. -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
