Delphiでスレッドを使用します
Delphiでスレッドを使いやすいです。
同期はよく使用できます:-)
関数
uses System.Classes, System.SysUtils, Vcl.Forms;
procedure Wait(Proc: TProc);
var
Thread: TThread;
begin
Thread := TThread.CreateAnonymousThread(procedure()
begin
Proc;
end);
Thread.FreeOnTerminate := True;
Thread.Start;
while not Thread.Finished do Application.ProcessMessages;
end;
使い方
待機(手順() 始める // .... 詳細 終わり);











Leave a Reply