Delphi Firemonkey在主线程 异步调用函数(推延调用)

Delphi Firemonkey在主线程 异步调用函数(推延调用) - Delphi
http://www.myexception.cn/delphi/1981046.html

下面是AsyncCallInUIThread的实现:
procedure AsyncCallInUIThread(Proc: TProc);
begin
  TThread.CreateAnonymousThread(
    procedure
    begin
      Sleep(0);
      TThread.Synchronize(nil, 
        procedure 
        begin 
          Proc; 
        end); 
    end).Start; 
end;

 

posted @ 2016-11-30 10:04  海蓝7  阅读(289)  评论(0编辑  收藏  举报