Jump to content

Sonjli

Members
  • Content Count

    110
  • Joined

  • Last visited

Everything posted by Sonjli

  1. Sonjli

    Tasks communication

    Hi, I hardly use tasks comm. A very simple question: is this code right? if lTask.Comm.Writer.IsFull then begin lLocalLogger.Debug(Format('Task Queue is FULL %s...', [lTask.Name]), lSenderLogTagMain); Sleep(1000); ... end else lTask.Comm.Send(WM_RECEIVE_DO, TOmniValue.CastFrom < IBroadcastMessage < TDataPacketBody >>(ABroadcastMessage)); ...
  2. Sonjli

    Tasks communication

    I try to better explain my problem. I understand the last question was a bit (lot...) stupid 😉 I need to know if the receiver task is alive. In some cases the receiver task has gone so I continue to send messages to it and I receive this error: "TOmniCommunicationEndpoint.Send: Queue is full" How can I avoid this problem? I would like to do something like this: if not MyTask.IsDead then MyTask.Comm.Send(...) // or if WatchDog(MyTask) <> Dead then MyTask.Comm.Send(...) // where WatchDog can check the healty of the Task and the MyTask.Comm.Writer.IsFull Thanks in advance, Eddy
  3. Sonjli

    Build to deploy process

    Hello, I have an automation system to deploy a big application. In this automation system I build some projects in Delphi. I use the "Set Component Properties" of GExperts to update some properties before the build process. I do this "by hand" setting this: Is it possible to use a command line for any tool of GExperts? Or an sdk to implements this? Thanks, Eddy
  4. Sonjli

    Build to deploy process

    Hi, yes I'd prefer this. How do you do this? GExperts does this before compiling or building.
  5. Sonjli

    Build to deploy process

    Hi, ok, I set my mind in ease...
  6. Hello, I will always repeat that without mmx my team could be 5 times slower... thanks for this diamond 🙂 I only have a small glitch: when I drag a generic Interface (i.e.: IMyInterface<TDummyType>) over a concrete class that I want to implement that generic Interface, then mmx don't work. It says that it can't parse the class. Can this be solved? Thanks again, Eddy
  7. Sonjli

    High processor due to internal loop

    I need strongest drugs... but also for me a coffee is enough for now 😅
  8. Sonjli

    High processor due to internal loop

    I need to read the XML quickly. But the server administrator warn me often about high cpu. I understand your axiom. I use Neslib.Xml and it seems well done both in performance and resource utilization. So you recommend me to say to sa to "put his heart in peace"... I can publish the problematic loops but, as you write, the "problem" is implicitly the XML library. Thanks guys.
  9. Sonjli

    Glitch in properties

    Hi, I hope this is not duplicate... but I can't find anyone with this behaviour. I don't know how to describe this, a glitch? Sorry, look at the attachment. Thanks Eddy
  10. Sonjli

    Glitch in properties

    What kind of infos do you need to reproduce?
  11. Hello, from this morning IDEFixPack 6.4.4 stop working on my IDE. I don't know what's changed. It's weird. Since today I never reinstall the expert, and never had any issue. The error is in attachments. Infos: - Windows 10 professional - 2004 (May updates) - Delphi 10.3.3 full patched - I always install with ISO, NOT Webinstaller. I NEVER used webinstaller in my life - I start the IDE "as administrator". - I restarted the pc but nothing changes - More weird: I uninstalled and reinstalled the 6.4.4 and from there the errors multiplied (more attachments). - The DLLs BPLs and everything are in their right place (C:\Users\Public\Documents\Embarcadero\Studio\20.0\Experts\). Checked also with GExperts "Expert Manager" and in registry - If I start the IDE NOT "as administrator" the problem with DLLs CompilerSpeedPack remains, but IDEFixPack starts correctly What's going on? Anyone knows this behaviour? Thanks, Eddy
  12. Sonjli

    IDEFixPack 6.4.4 stop working

    Hi, sorry for the late... No, it's not related with virus-scanner. I don't know... I'll try to clean "something" again.
  13. Sonjli

    IDEFixPack 6.4.4 stop working

    Thank you very much. IDEFixPack is a must have. Problem solved. I will pay attention about instability. The problem with the CompilerSpeedPack dlls remains... I disabled them as I don't use. What can be the problem? Eddy
  14. Sonjli

    IDEFixPack 6.4.4 stop working

    Hi guys, no one experiences this? @jbg any suggestion? Thanks, Eddy
  15. Sonjli

    COM: OleCheck() in polling

    I DO use COM events... so, should I change COINIT_MULTITHREADED in COINIT_APARTMENTTHREADED? Can this make server unstable? Remark: the server is no more reachable from other clients until I close my "buggy" ntservice. When this issue happens, I stop my ntservice and the other clients connects correctly. I doubt it is a server issue, I am barely sure I am doing something wrong.
  16. Sonjli

    COM: OleCheck() in polling

    Is it possible that if I never call the CoUninitialize the server goes out of order or lock after a lot of calls? I call CoInitilize every 5 minutes but I forgot calling CoUninitialize... f**k.
  17. Sonjli

    Stopping a TimedTask

    Ok, this is my last chance... after this you must wait for @Primož Gabrijelčič Try something like this: procedure ProcessMessages; var Msg: TMsg; begin while integer(PeekMessage(Msg, 0, 0, 0, PM_REMOVE)) <> 0 do begin TranslateMessage(Msg); DispatchMessage(Msg); end; end; ... FKeepAlive.Stop; repeat ProcessMessages; until FKeepAlive.Terminate(1000); ...
  18. Sonjli

    Stopping a TimedTask

    Hi, I am pretty sure the problem is related to this: http://www.omnithreadlibrary.com/book/chap05.html#introotl-messagelooprequired-console Regards, Eddy
  19. Sonjli

    Stopping a TimedTask

    The only problem I know about console apps is about "omni messaging system". Look at documentation http://www.omnithreadlibrary.com/book/chap05.html#introotl-messagelooprequired-console Maybe after 5 seconds the parallel timer is not terminated. Try this: destructor TjBASEComm.Destroy; begin if Assigned(FKeepAlive) then try FKeepAlive.Stop; FKeepAlive.Terminate; FKeepAlive.WaitFor; // This wait until the task is REALLY terminated. If it is stuck then the problem is elsewhere except end; try FConn.Free; except end; inherited; end; There is also a doubt about "FConn.SendStr('')": what does it do? Regards, Eddy
  20. Sonjli

    Stopping a TimedTask

    Hi, I think your problem is FConn. It seems a class field, and maybe it is destroyed before the timer ends? Regards, Eddy
  21. Hello, I am trying to read from a tcp socket some data and elaborate it in a pipeline. The pipeline should do something like this: Stage 1: polling the tcp socket and write the list of bytes in Output Stage 2: read output and make some calculation with bytes (I need to know when a packet starts and ends) The problem is that in the second stage I receive a list of simple "numbers" (a list of bytes) not continously. I mean that the bytes arrive in groups, but I need to save them in a global array to make my decisions. Questions: 1. Is the pipeline the right choice? 2. How can I use a global array inside a Pipeline? (I can't use SetParameter as in ITaskController) Thanks in advance Eddy
  22. Sonjli

    Pipeline with global variable

    No, it's "Pipeline" of OmniThreadLibrary
  23. Sonjli

    DSiWaitForTwoObjects

    Hello, I am trying to start communication between two threads. The first thread is not mine, it come from an external component library (always Delphi). This component has an event "OnSomethingHappens" that fires in a separate thread. So, in this event I use the OTL Communication system. For example: lMyTask.Comm.Send(WM_MYMESSAGE, MyObject); In my task I do a simple loop like this: while Task.Comm.Receive(lMsg) do begin if lMsg.MsgID = WM_MYMESSAGE then etc. But watching at OTL demos I see that you do somthing like this: repeat case DSiWaitForTwoObjects(task.TerminateEvent, task.Comm.NewMessageEvent, false, task.Param['Delay']) of WAIT_OBJECT_1: begin while task.Comm.Receive(msgID, msgData) do begin if msgID = MSG_CHANGE_MESSAGE then msg := msgData; end; end; WAIT_TIMEOUT: task.Comm.Send(0, msg); else break; //repeat end; until false; Sorry for my ignorance but I don't understand why you use the DSiWaitForTwoObjects and what it means. As I am having some problems in my loop, I think they are related to this use case... so can you explain, please? Thanks again, Eddy
  24. Sonjli

    DSiWaitForTwoObjects

    It's hard to reproduce, yes I understand your pov... I'll try
×