|
@@ -37,6 +37,8 @@ Type
|
|
|
Procedure Lock; inline;
|
|
|
Procedure Unlock; inline;
|
|
|
Public
|
|
|
+ constructor Create;
|
|
|
+ destructor Destroy; override;
|
|
|
procedure ProcessQueue; // called by
|
|
|
procedure QueueAsyncCall(const aMethod: TAsyncDataEvent; aData: Pointer; aFreeObject : Boolean = false);
|
|
|
procedure RemoveAsyncCalls(const aObject: TObject);
|
|
@@ -58,6 +60,17 @@ begin
|
|
|
System.LeaveCriticalsection(FLock);
|
|
|
end;
|
|
|
|
|
|
+constructor TAsyncCallQueues.Create;
|
|
|
+begin
|
|
|
+ System.InitCriticalSection(FLock);
|
|
|
+end;
|
|
|
+
|
|
|
+destructor TAsyncCallQueues.Destroy;
|
|
|
+begin
|
|
|
+ System.DoneCriticalSection(FLock);
|
|
|
+ inherited Destroy;
|
|
|
+end;
|
|
|
+
|
|
|
procedure TAsyncCallQueues.ProcessQueue;
|
|
|
|
|
|
var
|