TThread.RemoveQueuedEvents

Remove methods scheduled for execution from queue

Declaration

Source position: classesh.inc line 1958

public 
  class procedure RemoveQueuedEvents(aThread: TThread; 
                                    aMethod: TThreadMethod);  Static;
  class procedure RemoveQueuedEvents(aMethod: TThreadMethod);  Static;
  class procedure RemoveQueuedEvents(aThread: TThread);  Static;

Description

RemoveQueuedEvents removes methods from the list of methods waiting for execution in the main thread.

If only aThread is specified, all methods scheduled for execution by that thread are removed.

If only aMethod is specified, then all calls to that method are removed, regardless of the thread. The methods are compared with both the Code and Data pointers (method code and method object).

If both arguments are specified, then all calls to the given method by the given thread are removed. This is a known difference to Delphi that deletes all given methods or all methods by the given thread.

See also

Name Description
TThread.Queue Queue a method for execution in the main thread
TThread.Synchronize Synchronizes the thread by executing the method in the main thread.