Service OnExecute fails, spawned thread is not executed

前端 未结 4 1298
情歌与酒
情歌与酒 2021-01-23 14:27

First go at starting my own service in Delphi 7. Followed the docs and made the service spawn a custom thread that beeps and logs. Only it doesn\'t. Last attempt was to put the

4条回答
  •  再見小時候
    2021-01-23 14:59

    Remove below method event

    procedure TAviaABSwedenAMailer.ServiceExecute(Sender: TService);
    begin
      while not Terminated do
      begin
            Beep;
            Sleep(500);
            LG('Amailer is running');
                    ServiceThread.ProcessRequests(False);
      end;
    end;
    

提交回复
热议问题