Einzelnen Beitrag anzeigen

Whookie

Registriert seit: 3. Mai 2006
Ort: Graz
445 Beiträge
 
Delphi 10.3 Rio
 
#6

AW: DLL Callback und Threads..

  Alt 7. Okt 2024, 14:15
Im Prinzip sieht mein Thread etwa so aus:

Delphi-Quellcode:
procedure TDeviceThread.Execute;
begin
  while not Terminated do
  begin
    case fInQueue.PopItem(LSize, LItem) of
      wrSignaled: Begin
        // do something more with it (send/receive data)
        DoRequest(LItem); // Block till timeout or answer received
        fOutQueue.PushItem(LItem);
        Queue(DeliverItem);
      End;
      wrTimeout: Begin
        // every 200ms check if some internal handling is needed
      end;
    end
  end;
end;
Whookie

Software isn't released ... it is allowed to escape!
  Mit Zitat antworten Zitat