+ add function reference suitable overload of TThread.ForceQueue()

This commit is contained in:
Sven/Sarah Barth 2023-03-11 17:07:40 +01:00 committed by Pierre Muller
parent 34738e1db9
commit 42472aac89
2 changed files with 10 additions and 0 deletions

View File

@ -683,6 +683,13 @@ begin
InternalQueue(aThread, aMethod, True);
end;
{$ifdef FPC_HAS_REFERENCE_PROCEDURE}
class procedure TThread.ForceQueue(aThread: TThread; aMethod: TThreadProcedure); static;
begin
InternalQueue(aThread, aMethod, True);
end;
{$endif}
class procedure TThread.RemoveQueuedEvents(aThread: TThread; aMethod: TThreadMethod);
var
entry, tmpentry, lastentry: PThreadQueueEntry;

View File

@ -2009,6 +2009,9 @@ type
class procedure Queue(aThread: TThread; AProcedure : TThreadProcedure); static;
{$endif}
class procedure ForceQueue(aThread: TThread; aMethod: TThreadMethod); inline; static;
{$ifdef FPC_HAS_REFERENCE_PROCEDURE}
class procedure ForceQueue(aThread: TThread; aMethod: TThreadProcedure); inline; static;
{$endif}
class procedure RemoveQueuedEvents(aThread: TThread; aMethod: TThreadMethod); static;
class procedure RemoveQueuedEvents(aMethod: TThreadMethod); static;
class procedure RemoveQueuedEvents(aThread: TThread); static;