[fpc-devel] Russian locale information not compatible withFPClocale variables

Lee, John john.lee at logica.com
Wed Jul 30 20:32:43 CEST 2008


Wasn't suggesting no sync - just trying to say let's keep it very simple so we can do it quickly, but not, in words of mr E too simple! I yield to the gurus re how simple it can be w/o it not being usable. J

 [...]
> Because it's so simple we could then announce that we support
> parallelism eg in 2.2.4 or 2.4? Of course if a de facto standard did
> come along eg in Delphi or some other of the languages mentioned, we
> could take a view as to whether we'd support it. 

Sorry, but adding parallelism into the language without providing proper synchronization primitives sounds kind of stupid to me.

But to add some more food to the discussion: For "asynchronous" or something similar I would require it to be scoped:

procedure RunningMultiCore;
   procedure Task1; asynchronous; begin ... end;
   procedure Task2; asynchronous; begin ... end;
var
   i : Integer;
begin
   begin // Task scope
      Task1;

      for i := 1 to 1000 do
         Task2;
   end; // If we get here, Task1 and 1000 Task2's are finished.

   // Evaluate results...
end;

Alas, there's no way to declare sort of block-local variables... but this at least allows for finer grained parallelism without to many hassles (when and where to decide of some routine has finished, was it started at all before and such things). Coarse grain parallelism could be handled the usual way via TThread class & Co.

Of course, there's the problem with core-utilization (how many subroutines are allowed to run parallel? etc.pp.), but as those are mostly runtime decisions, there should either be some API to control the behaviour or the compiler/OS should decide as they seem fit. And the main problem: To evaluate any results, you need some memory being accessed by the parallel tasks, which brings us back to the initial objection: There's no sense in doing that without also providing proper synchronization primitives. "volatile" or "atomic" keyword, anyone?
-- 
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196
_______________________________________________
fpc-devel maillist  -  fpc-devel at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.





More information about the fpc-devel mailing list