Jump to content

Search the Community

Showing results for tags 'omnithreadpool'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Found 2 results

  1. We are working on a legacy application that is built using Delphi XE6. We have used the Omni Thread library and have version 3.05: 2015-09-07 installed. We are facing an issue while executing this OTL code. When the control reaches line aTaskControl.WaitFor(10000); it doesn't execute any task. It skips and terminates the thread. This is happening randomly and more specifically in our Production environment whereas in the Dev environment it works fine. In our task, we are connecting to our database and performing some checks and updating the records based on some business logic. Any inputs or suggestions will be really helpful and appreciated. Thanks.
  2. Hi all, Is it possible I have a race condition in a thread pool ? when I launch a task, I get a database connection from my database factory, but when the worker want to use it, Sometimes I've got an error message "mysql server has gone away", if I'm retrying after few sec, I didn't get the error message again, everything is working. Is there a specific status that a Thread from the thread pool is going to be destroyed ? Thanks Patrick FPoolSearch is definined as iOmniThreadPool; procedure TFrameCustomer.SearchForId(aValue : integer); var Params : TParameters; const cParam = 'I_IDCLI'; begin WithParamsReset(Params); WithParam(Params,cParam, aValue ,dtInteger); CreateTask(WorkerSearchId, GetTGUIDString ) .OnMessage(TaskMessage) .OnTerminated(TaskTerminated) .SetParameter('Params',TOmniValue.FromArray<rParameter>(Params)) .SetParameter('ProcName','prc_ClientSearchId') .Schedule(FPoolSearch); end; {------------------------------------------------------------------------} procedure WorkerSearchId(const task: IOmniTask); function FillData : TFCustomer; var aCust : TFCustomer; begin result:=TFCustomer.Create; with (task.ThreadData as TConnectionPoolData) do begin with DM.Proc do // Datamodule . Procedure begin WorkOnParams; // Inject parameters from the procedure Open; if RecordCount>0 then FilInfo(result,task); end; end; end; var aOVValue : TOmniValue; aRes : TFCustomer; begin (task.ThreadData as IConnectionPoolData) .WithProcedureName(task.Param['ProcName']) .WithParameters(task.Param['Params']); aRes := FillData; aOVValue := TOmniValue.CastFrom<TFCustomer>(TFCustomer.Clone(aRes)); aRes.Free; task.Comm.Send(MSG_SHOW,aOVValue); end;