|
@@ -29,6 +29,7 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
var
|
|
var
|
|
|
|
+ e: PRTLEvent;
|
|
t1, t2: TTest;
|
|
t1, t2: TTest;
|
|
|
|
|
|
procedure TTestThread.Execute;
|
|
procedure TTestThread.Execute;
|
|
@@ -46,17 +47,23 @@ begin
|
|
|
|
|
|
{ should remove only one }
|
|
{ should remove only one }
|
|
RemoveQueuedEvents(@t1.DoTest);
|
|
RemoveQueuedEvents(@t1.DoTest);
|
|
|
|
+
|
|
|
|
+ RTLEventSetEvent(e);
|
|
end;
|
|
end;
|
|
|
|
|
|
var
|
|
var
|
|
t: TTestThread;
|
|
t: TTestThread;
|
|
begin
|
|
begin
|
|
|
|
+ e := Nil;
|
|
t := TTestThread.Create(True);
|
|
t := TTestThread.Create(True);
|
|
try
|
|
try
|
|
|
|
+ e := RTLEventCreate;
|
|
|
|
+
|
|
t1 := TTest.Create;
|
|
t1 := TTest.Create;
|
|
t2 := TTest.Create;
|
|
t2 := TTest.Create;
|
|
|
|
|
|
t.Start;
|
|
t.Start;
|
|
|
|
+ RTLEventWaitFor(e);
|
|
t.WaitFor;
|
|
t.WaitFor;
|
|
|
|
|
|
CheckSynchronize;
|
|
CheckSynchronize;
|
|
@@ -67,6 +74,7 @@ begin
|
|
t1.Free;
|
|
t1.Free;
|
|
t2.Free;
|
|
t2.Free;
|
|
t.Free;
|
|
t.Free;
|
|
|
|
+ RTLEventDestroy(e);
|
|
end;
|
|
end;
|
|
end.
|
|
end.
|
|
|
|
|