mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-11 05:43:33 +00:00
1. Updated WaitHandle_Add2 to no use APC to dispatch to event loop, becuase winsock is not re-entrant, and don't want to risk corruption
2. Updated memory handling for async methods in Generic Marshal
This commit is contained in:
@@ -106,7 +106,9 @@ typedef enum ILibWaitHandle_ErrorStatus
|
||||
{
|
||||
ILibWaitHandle_ErrorStatus_NONE = 0,
|
||||
ILibWaitHandle_ErrorStatus_INVALID_HANDLE = 1,
|
||||
ILibWaitHandle_ErrorStatus_TIMEOUT = 2
|
||||
ILibWaitHandle_ErrorStatus_TIMEOUT = 2,
|
||||
ILibWaitHandle_ErrorStatus_REMOVED = 3,
|
||||
ILibWaitHandle_ErrorStatus_MANAGER_EXITING = 4
|
||||
}ILibWaitHandle_ErrorStatus;
|
||||
|
||||
typedef BOOL(*ILibProcessPipe_WaitHandle_Handler)(HANDLE event, ILibWaitHandle_ErrorStatus status, void* user);
|
||||
@@ -116,7 +118,7 @@ void ILibProcessPipe_WaitHandle_Remove(ILibProcessPipe_Manager mgr, HANDLE event
|
||||
void ILibProcessPipe_WaitHandle_Add_WithNonZeroTimeout(ILibProcessPipe_Manager mgr, HANDLE event, int milliseconds, void *user, ILibProcessPipe_WaitHandle_Handler callback);
|
||||
#define ILibProcessPipe_WaitHandle_Add(processPipeManager, eventHandle, user, callback) ILibProcessPipe_WaitHandle_Add_WithNonZeroTimeout(processPipeManager, eventHandle, 0, user, callback)
|
||||
|
||||
// These methods will use an APC to context switch to the calling thread when dispatching
|
||||
// These methods will context switch to the chain thread when dispatching
|
||||
void ILibProcessPipe_WaitHandle_Add2_WithNonZeroTimeout(ILibProcessPipe_Manager mgr, HANDLE event, int milliseconds, void *user, ILibProcessPipe_WaitHandle_Handler callback);
|
||||
#define ILibProcessPipe_WaitHandle_Add2(processPipeManager, eventHandle, user, callback) ILibProcessPipe_WaitHandle_Add2_WithNonZeroTimeout(processPipeManager, eventHandle, 0, user, callback)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user