From 68c4a47215ad784f94f2e7edbb6b47b439ae50a9 Mon Sep 17 00:00:00 2001 From: micha Date: Fri, 15 Apr 2005 09:26:23 +0000 Subject: [PATCH] some more annotation git-svn-id: trunk@7076 - --- examples/synchronize.pp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/synchronize.pp b/examples/synchronize.pp index e2b4434648..37751c1726 100644 --- a/examples/synchronize.pp +++ b/examples/synchronize.pp @@ -35,13 +35,15 @@ program Synchronize; {$mode objfpc}{$H+} -{$threading on} + +{ threading directive not needed anymore for 1.9.8+ } +{ $threading on} uses - Interfaces, Classes, StdCtrls, Forms, Buttons, Menus, ComCtrls, {$ifdef UNIX} - cthreads, + CThreads, {$endif} + Interfaces, Classes, StdCtrls, Forms, Buttons, Menus, ComCtrls, SysUtils, Extctrls; @@ -117,6 +119,8 @@ threadvar var Form1 : TForm1; TotalCount: integer; + { GlobalData is an example of what you should NOT do :) + Access from multiple threads to same variable unprotected } GlobalData: integer; constructor TAThread.Create(CreateSuspended: boolean);