1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

1. Added ability to query if Select was interrupted with APC

2. Updated So that before readableStream and 'exit' are dispatched, APC's are unrolled if 'select' was interrupted, preventing stack corruption caused by trying to make a re-entrant winsock call, which is not supported by winsock.
This commit is contained in:
Bryan Roe
2019-08-07 11:32:33 -07:00
parent d5962cd1b2
commit a89a3204c1
4 changed files with 28 additions and 3 deletions

View File

@@ -1510,6 +1510,10 @@ HANDLE ILibChain_GetMicrostackThreadHandle(void *chain)
{
return(((struct ILibBaseChain*)chain)->MicrostackThreadHandle);
}
int ILibChain_SelectInterrupted(void *chain)
{
return(((struct ILibBaseChain*)chain)->PreSelectCount == 0 ? 0 : !(((struct ILibBaseChain*)chain)->PreSelectCount == ((struct ILibBaseChain*)chain)->PostSelectCount && ((struct ILibBaseChain*)chain)->PreSelectCount != 0));
}
#endif
void ILibChain_Safe_Destroy(void *object)