mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-09 16:40:09 +02:00
parent
42cc1d504f
commit
590e2f7977
@ -236,7 +236,7 @@ begin
|
|||||||
// enable for all platforms once http://bugs.freepascal.org/view.php?id=16884
|
// enable for all platforms once http://bugs.freepascal.org/view.php?id=16884
|
||||||
// is fixed for all platforms (in case the fix for non-unix platforms also
|
// is fixed for all platforms (in case the fix for non-unix platforms also
|
||||||
// requires this field at least)
|
// requires this field at least)
|
||||||
{$if defined(unix) or defined(windows)}
|
{$if defined(unix) or defined(windows) or defined(os2)}
|
||||||
if not FExternalThread and not FInitialSuspended then
|
if not FExternalThread and not FInitialSuspended then
|
||||||
Resume;
|
Resume;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
@ -1602,7 +1602,7 @@ type
|
|||||||
procedure Queue(aMethod: TThreadMethod);
|
procedure Queue(aMethod: TThreadMethod);
|
||||||
property ReturnValue: Integer read FReturnValue write FReturnValue;
|
property ReturnValue: Integer read FReturnValue write FReturnValue;
|
||||||
property Terminated: Boolean read FTerminated;
|
property Terminated: Boolean read FTerminated;
|
||||||
{$ifdef windows}
|
{$if defined(windows) or defined(OS2)}
|
||||||
private
|
private
|
||||||
FInitialSuspended: boolean;
|
FInitialSuspended: boolean;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
@ -107,8 +107,11 @@ var
|
|||||||
Flags: cardinal;
|
Flags: cardinal;
|
||||||
begin
|
begin
|
||||||
AddThread;
|
AddThread;
|
||||||
Flags := dtStack_Commited;
|
{ Always start in suspended state, will be resumed in AfterConstruction if necessary
|
||||||
|
See Mantis #16884 }
|
||||||
|
Flags := dtStack_Commited or dtSuspended;
|
||||||
FSuspended := CreateSuspended;
|
FSuspended := CreateSuspended;
|
||||||
|
FInitialSuspended := CreateSuspended;
|
||||||
if FSuspended then Flags := Flags or dtSuspended;
|
if FSuspended then Flags := Flags or dtSuspended;
|
||||||
FHandle := BeginThread (nil, StackSize, @ThreadProc, pointer (Self),
|
FHandle := BeginThread (nil, StackSize, @ThreadProc, pointer (Self),
|
||||||
Flags, FThreadID);
|
Flags, FThreadID);
|
||||||
|
Loading…
Reference in New Issue
Block a user