EThread, Failed to create new threads.
Original Reporter info from Mantis: mrdebug
-
Reporter name: Denis Gottardello
Original Reporter info from Mantis: mrdebug
- Reporter name: Denis Gottardello
Description:
Watch this simple thread:
Code:
unit UThread;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, TFMainForm;
type
ThThread = class(TThread)
private
MainForm: TMainForm;
protected
procedure Execute; override;
public
constructor Create(CMainForm: TMainForm);
end;
implementation
constructor ThThread.Create(CMainForm: TMainForm);
begin
MainForm:= CMainForm;
self.FreeOnTerminate:= true;
inherited Create(false);
end;
procedure ThThread.Execute;
begin
Synchronize(@MainForm.AggiornaCreati);
Terminate;
end;
end.
How do you see this thread is created and then destroyed immediately.
I wrote a program that creates a thread every 100 milliseconds. Under Windows, the program can create an infinite number of threads. Under linux less than 400.
It seems that
Code:
Terminate
not run under Linux.
I get this error
EThread, Failed to create new threads.
How can I fix this serious problem?
Sorry for my bad English.
Mantis conversion info:
- Mantis ID: 10815
- Version: 2.2.0
- Fixed in version: 2.2.2