Presentation is loading. Please wait.

Presentation is loading. Please wait.

SIMPLE PARALLEL PROGRAMMING WITH PATTERNS AND OMNITHREADLIBRARY PRIMOŽ GABRIJELČIČ SKYPE: GABR42

Similar presentations


Presentation on theme: "SIMPLE PARALLEL PROGRAMMING WITH PATTERNS AND OMNITHREADLIBRARY PRIMOŽ GABRIJELČIČ SKYPE: GABR42"— Presentation transcript:

1 SIMPLE PARALLEL PROGRAMMING WITH PATTERNS AND OMNITHREADLIBRARY PRIMOŽ GABRIJELČIČ WWW.THEDELPHIGEEK.COM, @THEDELPHIGEEK, SKYPE: GABR42 HTTP://PRIMOZ.GABRIJELCIC.ORG Intro music: Nothing is Permanent by Deathmøle, http://deathmole.bandcamp.com

2 PARALLEL PROGRAMMING THE ART OF DOING MULTIPLE THINGS AT THE SAME TIME

3 WHY?  CPUs are not getting any faster  They just contain more and more parallel cores

4 WHEN?  Slow background process  Background communication  Executing synchronous API  Multicore data processing  Multiple clients

5 THREAD VS. TASK  Task is part of code that has to be executed  Thread is the execution environment .NET – Task Parallel Library  Delphi – Parallel Programming Library (XE7)  Delphi – OmniThreadLibrary (2007)

6 PATTERN APPROACH  Working with building blocks .NET – foreach, Dataflow  C# – async  Delphi PPL (XE7) – Future, For, Join  Delphi OTL (2009) – Async, Future, Join, For, Pipeline …

7 PPL VS. OTL PPL  ✓ built-in  ✓ multi-OS  ✗ three patterns  ✗ some messaging support OTL  ✗ Needs to be installed (GetIt)  ✗ Windows/VCL only (but wait!)  ✓ ten patterns  ✓ based on messaging

8 ASYNC/AWAIT DEMO

9 JUST SAY NO! Never, never, never access UI from a background thread! NEVER!

10 ASYNC/AWAIT Async( some_code// executed in a background thread ).Await( other_code// executed in a main thread )

11 PARALLEL PATTERNS  Async/Await  Async  Future  ForEach / For  Join  Parallel task  Pipeline  Background worker  Fork/Join  Map

12 PROJECT STATUS  http://www.omnithreadlibrary.com  Google+ community OmniThreadLibrary  StackOverflow [omnithreadlibrary]  http://www.thedelphigeek.com  http://primoz.gabrijelcic.org  Twitter: @thedelphigeek Skype: gabr42


Download ppt "SIMPLE PARALLEL PROGRAMMING WITH PATTERNS AND OMNITHREADLIBRARY PRIMOŽ GABRIJELČIČ SKYPE: GABR42"

Similar presentations


Ads by Google