Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

Tag: Delphi TCriticalSection TThread

Digital Innovation Partner

TCriticalSection Threrad Example Delphi

TThreadedMsgEvent = class( TThread ) private FLock : TCriticalSection; FStr : TQueue<String>; FMemo : TMemo; function GetEvent : String; protected procedure Execute; override; public procedure AddEvent( aMsg : String ); constructor Create( AMemo: TMemo ); destructor Destroy; override; end; implementation { TThreadedMsgEvent } procedure TThreadedMsgEvent.AddEvent(aMsg: String); begin FLock.Acquire; FStr.Enqueue( FormatDateTime(‘DD/MM/YY HH:NN:SS.ZZZ’,Now)+ ‘ : ‘+ aMsg…
Leggi tutto