Jump to content

alr1976

Members
  • Content Count

    3
  • Joined

  • Last visited

Everything posted by alr1976

  1. Hi , I Need to handle exception in parallel.foreach because i Need to check for each task i got problem. I tried: parallel.&Foreach(0,1) .TaskConfig(parallel.TaskConfig.OnTerminated( procedure(const task: IOmniTaskControl) var excp: Exception; begin if assigned(task.FatalException) then begin excp := task.DetachException; outvatinfo.Lines.Add('Caught async exception '+excp.ClassName+':'+excp.Message); FreeAndNil(excp); end; end)) .Execute( procedure(const value: integer) begin raise Exception.Create('Exception in Async'); //strtofloat('&'); // outvatinfo.Lines.Add(datetimetostr(now())) ; end); But It crash.... Someone can help me? Thanks Alessandro
  2. alr1976

    Ttask loop each 1 second

    Hi! I Need to run a task each 1 second but i Need to pass a variable First Time. It Is possible? How ? Can you do male a small example? Thanks  PS i buy your last book. Next week i Will riceive It.
  3. alr1976

    Handle parallel.foreach exception

    Hi! I Need to run a task each 1 second but i Need to pass a variable First Time. It Is possible? How ? Can you do male a small example? Thanks PS i buy your last book. Next week i Will riceive It.
×