mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 09:59:23 +02:00
some more annotation
git-svn-id: trunk@7076 -
This commit is contained in:
parent
66da3891a0
commit
68c4a47215
@ -35,13 +35,15 @@
|
|||||||
program Synchronize;
|
program Synchronize;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
{$threading on}
|
|
||||||
|
{ threading directive not needed anymore for 1.9.8+ }
|
||||||
|
{ $threading on}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Interfaces, Classes, StdCtrls, Forms, Buttons, Menus, ComCtrls,
|
|
||||||
{$ifdef UNIX}
|
{$ifdef UNIX}
|
||||||
cthreads,
|
CThreads,
|
||||||
{$endif}
|
{$endif}
|
||||||
|
Interfaces, Classes, StdCtrls, Forms, Buttons, Menus, ComCtrls,
|
||||||
SysUtils, Extctrls;
|
SysUtils, Extctrls;
|
||||||
|
|
||||||
|
|
||||||
@ -117,6 +119,8 @@ threadvar
|
|||||||
var
|
var
|
||||||
Form1 : TForm1;
|
Form1 : TForm1;
|
||||||
TotalCount: integer;
|
TotalCount: integer;
|
||||||
|
{ GlobalData is an example of what you should NOT do :)
|
||||||
|
Access from multiple threads to same variable unprotected }
|
||||||
GlobalData: integer;
|
GlobalData: integer;
|
||||||
|
|
||||||
constructor TAThread.Create(CreateSuspended: boolean);
|
constructor TAThread.Create(CreateSuspended: boolean);
|
||||||
|
Loading…
Reference in New Issue
Block a user