View Issue Details

IDProjectCategoryView StatusLast Update
0030535FPCRTLpublic2017-05-21 20:04
ReporterSerge AnvarovAssigned ToFlorian 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWindowsOSWindowsOS VersionWindows 7
Product Version3.0.0Product Build 
Target VersionFixed in Version3.1.1 
Summary0030535: IsMultiThread always true
DescriptionIsMultiThread is always true, regardless of the use additional threads
Steps To Reproduceprogram Project1;

{$APPTYPE CONSOLE}

{$R *.res}

begin
  if System.IsMultiThread then
    Writeln('What???')
  else
    Writeln('OK');
  Readln;
end.
Additional InformationTested on x64, x32 and with GUI.
TagsNo tags attached.
Fixed in Revision35567
FPCOldBugId
FPCTarget
Attached Files

Activities

Thaddy de Koning

2016-09-01 11:15

reporter   ~0094360

On debian-arm it works as expected. Prints 'OK'

Jonas Maebe

2016-09-01 11:58

manager   ~0094365

It is because threadvars on Windows use TLS, which requires the multithreading support to be initialised even for singlethreaded programs.

We probably should use a different (and internal) variable to record the fact that the TLS has been initialised.

Serge Anvarov

2017-03-04 18:48

reporter   ~0098640

3.0.2 The error remains. Many RTL functions make unnecessary synchronization, even in single-threaded mode.

Issue History

Date Modified Username Field Change
2016-08-31 19:46 Serge Anvarov New Issue
2016-09-01 11:15 Thaddy de Koning Note Added: 0094360
2016-09-01 11:58 Jonas Maebe Note Added: 0094365
2017-03-04 18:48 Serge Anvarov Note Added: 0098640
2017-03-11 22:36 Florian Fixed in Revision => 35567
2017-03-11 22:36 Florian Status new => resolved
2017-03-11 22:36 Florian Fixed in Version => 3.1.1
2017-03-11 22:36 Florian Resolution open => fixed
2017-03-11 22:36 Florian Assigned To => Florian
2017-05-21 20:04 Serge Anvarov Status resolved => closed