What's the trick, what needs to be done? Is Parallel. Program is slowed down to a creeping pace. Using Parallel.Async() + "DisplayProgress". Warning: 'TOmniTaskControl.SetMonitor: Task can be only monitored with a single monitor'ģ. A simple timer firing "DisplayProgress" every 500 milliseconds. With AsyncCall's "TAsyncCalls.VCLInvoke(procedure begin DisplayProgress end)" in "CreateThumbs" this worked like a charm. I use a global variable for the count of the produced thumbnails that is incremented (TInterlocked.Increment) in "CreateThumbs". Procedure ( i : integer ) begin CreateThumbs ( JPGList ) end ) Įverything works OK, except for I cannot get the status bar to display the progress. reset wrong code try timer VW RCD510 MID EU car radio: read/write. ThumbPool := CreateThreadPool ( 'VSBPool' ) ThumbPool. There are three variations of Delphi RCD510 CD players on the market: 1) RCD510. I noticed a considerable time lag of a few seconds before the first thumbnail appeared on the screen, so I tried to use a self created thread pool which didn't help much. After that I display a message on a TStatusBar every 50 thumbnails or every second, whichever comes first.
#Delphi thread as timer update
So I force an update of the TImage every time one of these 30 thumbnails has been painted. Let's say there are 800 JPG in a directory, the first 30 of which fit on the screen. For creating thumbnails and displaying them I have been using AsyncCalls by Andreas Hausladen for a long time, but now I want to switch to OTL because AsyncCalls isn't maintained any longer. I read JPG files from disk into a TObjectList and create thumbnails from them that are painted onto a TImage.