On Fri, 31 Mar 2017, fredvs wrote:
Hello.
Michael Van Canneyt wrote
To fix that, you can do the following.
In the library startup code, create a dummy thread.
This will initialize the threads mechanism:
with TThread.Create(False) do
end.
I use this for initialize my libraries:
Best is probably:
Type
TDummyThread = Class(TThread)
public
procedure execute; override;
end;
procedure TDummyThread.Execute;
begin
FreeOnTerminate:=True;
Terminate;
end;
begin
TDummyThread.Create(True)
end.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal