[fpc-pascal]executing different gtk applications from FPC

Thomas Schatzl tom_at_work at yline.com
Thu Jul 19 03:58:13 CEST 2001

Subject: Re: [fpc-pascal]executing different gtk applications from FPC


> > And how can I make that with Win32?
> > Where can I get informations about the windows unit?
> > Is the windows unit compatible with the linux unit?
> You should get the Win32 API help file (from Microsoft plataform SDK, or
> from VB Enterprise, or from Delphi...). All APIs calls are declared on
> the Windows unit and you can create processes, threads (use this instead
> of processes) and wait for them to finish if you want, or query their
> status. The "2" examples show how to use semaphores to implement
> critical regions when the pararel processes create problems with each
> other.

Note that imo its not recommended to create sophisticated multithreading
programs since the basic RTL (e.g. system unit) isn't threadsafe yet
(afaik). Basically at least all things which implicitly or explicitly
allocate memory (classes, ansistrings, ...) might cause _really_ nasty and
weird things.
Even exchanging the memory management functions by OS native ones might not
be sufficient (well, I've some threading code here which behaves weird when
compiled with FPC but is fine with Delphi although the memory manager is
exchanged; but this might be a program error and since FPC isn't supposed to
be threadsafe you can't call it a bug imo)


More information about the fpc-pascal mailing list