Questions tagged [omnithreadlibrary]

OmniThreadLibrary is a Delphi library meant to ease threading.

It's written mainly by Primož Gabrijelčič and released under BSD license.

Resources:

124 questions
0
votes
1 answer

Is there a way to exit a thread in a Parallel.foreach loop which is stuck

I am using OmniThread Parallel.foreach(). There are instances where the loop takes a long time or gets stuck. I would like to know, is it possible to timeout each process in the Parallel.foreach() loop?
James
  • 41
  • 4
0
votes
0 answers

How to cancel an IOmniParallelSimpleLoop?

I'm starting using the OTL for a simple project but I'm currently stuck at stopping and restarting a simple parallel loop. Use case The user is able to start a query to resolve hostnames of a list of IP address by pressing a button. At any moment,…
0
votes
1 answer

How do I get a boolean result from a function using OmniThreadLibrary?

I have a Delphi (Windows) application created using Delphi 10 that has some blocking calls that I would like to convert to using threads. Unfortunately for me, these are not procedures, but functions. (And information on how to return function…
Various60
  • 1
  • 2
0
votes
0 answers

How to restart the job again without freeing pipeline input

I'm using OTL, pipelines tasks to check a bunch of URLs. My question is: How to restart the search again quickly, I mean it takes time to add the strings again to Pipeline input and start again, is there a way to do that? If not? Am I using the…
0
votes
1 answer

How to get Worker from the IOmniTaskControl?

Is it possible to get the Worker object from a task handle of the type IOmniTaskControl? For example, on a terminate event, I want to log details of which worker was affected.
user173399
  • 464
  • 5
  • 21
0
votes
0 answers

What OTL high level abstraction is best suited for parallel picture loading?

I would like to expose you my problem here. I'm trying to build a user interface in one of my application where the user can see multiple pictures (TImage objects) on the same form. These pictures should be loaded from potentially large image files…
mathieu
  • 235
  • 2
  • 11
0
votes
1 answer

How to add tasks to OTL to be processed LIFO?

My app scans folders for images and generates thumbnails from them to draw in a grid. I have a OnDrawCell handler, which adds a task to OTL to read required image, resize it (async) and draw back on to a cell (in main thread). This works fine,…
Kromster
  • 7,181
  • 7
  • 63
  • 111
0
votes
1 answer

Handling NOTICE events from PostgreSQL in a separate thread in Delphi with Devart's PgDAC components

I want to execute long queries in a separate thread in order to be able to abort them and also to give feedback to the users. All of this is working but I sometimes get Access Violations because, I think, the processing of the OnNotice events is not…
JC Boggio
  • 367
  • 1
  • 11
0
votes
1 answer

OmniThreadLibrary memory leak (consumption) on pipeline running from another thread

I'm running pipeline (thread's pipeline from OmniThreadLibrary) from another thread and got memory leak or rather memory consumption. But when application close then it's ok and there are no memory leak report (ReportMemoryLeaksOnShutdown :=…
JayDi
  • 1,037
  • 15
  • 24
0
votes
1 answer

parallel hough algorithm using omnithread lib

I want to speed up image processing using the hough circle detection. // For all rows in image: for y:=0 to AnalysisBitmap.Height-1 do begin // For all pixel in one row : for x:=0 to AnalysisBitmap.Width-1 do begin // Is…
user1769184
  • 1,571
  • 1
  • 19
  • 44
0
votes
0 answers

parallel painting into a TBitmap

the question here merge paint results in thread bitmap painting is derived from using TThread and older versions of DELPHI. I found now the omnithread library shipped with Delphi XE 7 and can not decide which design pattern should be used for this…
user1769184
  • 1,571
  • 1
  • 19
  • 44
0
votes
0 answers

OmniThread: ThreadPool stops working

There is this strange error i am encountering where omnithread stops scheduling tasks and just stops working... Here is the code to reproduce the error i am having Procedure PerformOperations(const task: IOmniTask); Begin …
Junaid Noor
  • 474
  • 9
  • 24
0
votes
1 answer

Why won't TTimer work in OTL worker task?

I wanted to realize a repetitive task in an OmniThreadLibrary worker task, that runs in another thread. The task should be executed every 3 seconds, for example. Therefore I wrote a TOmniWorker descendant with an instance of TTimer as you can see…
René Hoffmann
  • 2,766
  • 2
  • 20
  • 43
0
votes
0 answers

How to perform a queued task with OmniThreadLibrary

Can someone give me some guidance on how to use OmniThreadLibrary to perform a "queued" task. Could be anything, but in this question let me use the example of sending 100 emails. I want to only be using 3 threads at a time. How do I queue the…
RaelB
  • 3,301
  • 5
  • 35
  • 55
0
votes
1 answer

What would the design look like for a class that implements a threaded email sending queue?

So my application is a taxi call dispatch system, in which an operator receives calls over the phone and assigns received calls to a driver. On the Call Details form where the call detail is entered, as soon as the Save button is clicked, the form…
Steve F
  • 1,527
  • 1
  • 29
  • 55
1 2 3
8 9