[Lazarus] AsyncProcess code problem
Mattias Gaertner
nc-gaertnma at netcologne.de
Fri Jun 9 10:02:27 CEST 2017
On Fri, 9 Jun 2017 17:08:25 +0930
Steve Gatenby via Lazarus <lazarus at lists.lazarus-ide.org> wrote:
> Having a problem with some code here :)
>
> Lazarus 1.9.0 r55266M FPC 3.1.1 x86_64-linux-gtk2
>
> I create a thread every second to run a process (TAsyncprocess), then
> FreeAndNil the process once done.
If you are using threads, then why use TAsyncProcess?
TAsyncProcess was invented as a non blocking TProcess for the main
thread.
Probably it can be made thread safe for the gtk2 interface, but
if you already use threads, then you can simply use TProcess or
TProcessUTF8 with less overhead.
Mattias
More information about the Lazarus
mailing list