daniilavdeev wrote: > Does this approach make sense to you?
Yes, I had similar thoughts yesterday. It would be convenient to have a virtual `Reset/Detach` function in the `HostThread` class that calls `pthread_detach` and `CloseHandle` for `HostThreadPosix` and `HostThreadWindows` accordingly. As you mentioned, `HostThread` already provides a `Reset` method, but for certain reasons `HostThreadPosix` introduces a new `Detach` method rather than simply overriding the existing Reset function. Anyway, it should not require considerable effort to unify `HostThreadPosix` and `HostThreadWindows` interfaces at this point - this would essentially involve appropriately overriding the Reset function in `HostThreadPosix` and removing the `Detach` method. In this case it would be possible to just call a `HostThread::Reset()` at the place where I originally placed the `pthread_detach` call. The only concern I have is whether it would be acceptable to change the `HostThreadPosix` interface directly in this patch? Although it would spare me the need to manage a separate PR, the community generally prefers small, separate patches. Nevertheless, if you think it would be appropriate, I could do it as part of this patch. https://github.com/llvm/llvm-project/pull/177572 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
