Jump to content

UniThreadTimer on UniServerModule doesnt work ?


erich.wanker
 Share

Recommended Posts

i have a 1.90.0.1545 -UniGui app with Hyperserver ..

And nothing happens with the UniThreadTimer .. and nothing is stored in Log-File

what make i wrong??

 

procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
begin
  UniThreadTimer1.Enabled:=true;
  Logger.AddLog('Servermodule startet am::' + datetostr(now));
  MimeTable.AddMimeType('rtf', 'application/rtf', False);
end;
procedure TUniServerModule.UniThreadTimer1Timer(Sender: TObject);
begin

  UniThreadTimer1.Lock;
  try

    Logger.AddLog('lastSync:' + datetostr(now));

  // do something WITHOUT using main, mainmodule or something else

 

ThanX for help

erich

Link to comment
Share on other sites

As long as I unlock the timer after having done something, it works in my project running as a DLL under Apache.

procedure TUniServerModule.UniThreadTimer1Timer(Sender: TObject);
begin
  UniThreadTimer1.Lock;
  syslog('test server');
  UniThreadTimer1.Unlock;
end;

server log.png

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...