You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL] Add one more WA on Win for shutdown process (#19195)
WA for host task threads handling.
We must call join() or detach() on host task execution thread to avoid
UB.
DLLMain parameter lpReserved == NULL if library is unloaded via
FreeLibrary.
In this case we can't join threads within DllMain call due to global
loader lock
and DLL_THREAD_DETACH signalling.
lpReserved != NULL if library is unloaded during process termination. In
this case
Windows terminates threads but leave them in signalled state, prevents
DLL_THREAD_DETACH notification and we can call join() as NOP.
Note that FreeLibrary called with sycl RT handle does not guarantee
which path
will be used. Windows can (and actually does) simply postpone actual
unloading
till the end of program.
---------
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
0 commit comments