| Anonymous | Login | Signup for a new account | 2010-02-09 03:12 CET |
| All Projects | FPC | Lazarus: Packages, Patches | Lazarus CCR | Mantis | fpGUI |
| Main | My View | View Issues | Change Log | Roadmap | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0009016 | [FPC] Compiler | block | always | 2007-06-06 12:33 | 2007-09-25 12:56 | ||||
| Reporter | Lionel | View Status | public | ||||||
| Assigned To | Jonas Maebe | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | 2.3.1 | ||||||
| Summary | 0009016: Create Thread Limit | ||||||||
| Description |
Hello, there is thread creation limit on linux, i don't try under win32 environment. With Kylix compiler, no problem. |
||||||||
| Additional Information |
Very simple sample : program test_thread; {$IFDEF FPC} {$PACKRECORDS C} {$MODE DELPHI} // Delphi-compatible mode in FreePascal {$ASMMODE Intel} {$UNDEF BORLAND} {$ELSE} {$APPTYPE CONSOLE} {$ENDIF} uses {$IFDEF FPC} cthreads, {$ENDIF} SysUtils, Classes; type TTestThread = class(TThread) private { Déclarations privées } protected procedure Execute; override; end; const MAX_THREAD : integer = 1000; var I : integer; { TTestThread } procedure TTestThread.Execute; begin Writeln('[' + IntToStr(Self.ThreadID) + '] Running...'); Terminate; end; procedure CreateThread; var TestThread : TTestThread; begin TestThread := TTestThread.Create(true); TestThread.FreeOnTerminate := true; TestThread.Resume; end; begin try for I := 1 to MAX_THREAD do begin Writeln('Create ' + IntToStr(I) + ' ...'); CreateThread; Sleep(100); end; Writeln('Finish'); ReadLn; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. |
||||||||
| Tags | No tags attached. | ||||||||
| FPCOldBugId | 0 | ||||||||
| Fixed in Revision | 8430 | ||||||||
| Attached Files |
|
||||||||
|
|
|||||||||
Relationships |
|||||||||||
|
|||||||||||

