1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-06 00:13:33 +00:00

Added ability to Save/Restore handle wait state

Fixed edge case that could cause a connection to resume twice
This commit is contained in:
Bryan Roe
2020-05-20 12:05:38 -07:00
parent f2d63ea116
commit 16a2f437c3
4 changed files with 102 additions and 2 deletions

View File

@@ -999,6 +999,10 @@ int ILibIsRunningOnChainThread(void* chain);
}ILibChain_WriteEx_data;
char *ILibChain_MetaData(char *file, int number);
int ILibGetMillisecondTimeSpan(struct timeval *tv1, struct timeval *tv2);
void* ILibChain_WaitHandle_RemoveAndSaveState(void *chain, HANDLE h);
void ILibChain_WaitHandle_RestoreState(void *chain, void *state);
BOOL ILibChain_WaitHandleAdded(void *chain, HANDLE h);
void ILibChain_AddWaitHandleEx(void *chain, HANDLE h, int msTIMEOUT, ILibChain_WaitHandleHandler handler, void *user, char *metadata);
#define ILibChain_AddWaitHandle(chain, h, msTIMEOUT, handler, user) ILibChain_AddWaitHandleEx(chain, h, msTIMEOUT, handler, user, ILibChain_MetaData(__FILE__, __LINE__))
void ILibChain_RemoveWaitHandle(void *chain, HANDLE h);