Scheduler Do not execute SynchronizedAfterRun

Home Forums kbmMW Scheduler Do not execute SynchronizedAfterRun

Viewing 3 reply threads
  • Author
    Posts
    • #55208
      TomYU
      Participant

      hi,kim

      Scheduler.Run(procedure
      begin
      r1 := kbmMWPooledSimpleClient1.SendPing;
      if not VarIsNull(r1) then
      r2:=r1;
      end)
      .SynchronizedAfterRun(procedure
      begin

      log.Info(kbmMWNativeHTTPClientTransport1.Host);


      I run project use debug mode,found SynchronizedAfterRun is not executed most of the time.

      This is a very serious problem!!!

      kbmMW 5.13

      best regards

      Tom YU.

      • This topic was modified 5 years, 1 month ago by TomYU.
    • #55214
      kimbomadsen
      Keymaster

      (replied directly by email)

      SynchronizedAfterRun now use Queue rather than Synchronize, to be sure it will not deadlock in some situations, where the main thread is blocked.

      To ensure the after run is executed, the mainthread must allow for execution from time to time.

    • #55249
      TomYU
      Participant

      I had to change Queue to Synchronize to ensure that my application can run normally.

    • #55290
      kimbomadsen
      Keymaster

      I will revert the change and have added a QueuedAfterRun etc.

       

Viewing 3 reply threads
  • You must be logged in to reply to this topic.