Download presentation
Presentation is loading. Please wait.
Published byJavon Leech Modified over 10 years ago
1
H IGH - LEVEL M ULTITHREADED P ROGRAMMING [P ART I] Primož Gabrijelčič
2
B ACKGROUND I NFORMATION
3
About Me Primož Gabrijelčič Programmer, consultant, writer, speaker – thedelphigeek.com – www.glagolite.si/delphi Working with Delphi since Delphi 1 Hacking multithreaded code since 1999
4
About OmniThreadLibrary „VCL for multithreading“ Delphi 2007 – XE3[4] Open source – OpenBSD license – www.omnithreadlibrary.com – omnithreadlibrary.googlecode.com Win32/Win64
5
About the Webinars Code and video: www.omnithreadlibrary.com/webinars Code = free, video = $10, bundles! 20 free books, courtesy of the De Novo Software, www.denovosoftware.com
6
Installation Download the installation package from the Google Code or checkout the SVN repository Add installation folder and its src subfolder to the project search path or Win32/64 library path Add the OtlParallel unit to the uses list
7
Documentation Blog tutorials “The book” Presentations Forum Google+: OmniThreadLibrary @TheDelphiGeek: #omnithreadlibrary www.omnithreadlibrary.com
8
Why Multithreading? Improve performance Improve responsiveness
9
H IGH -L EVEL A BSTRACTIONS
10
Why? Designing parallel solutions is hard Writing multithreaded code is hard Testing multithreaded applications is hard Debugging multithreaded code is pure …
12
OTL to the Rescue! Well-tested components … packed in reusable classes … with high-level parallel programming support.
13
High-Level Abstractions Async [/Await] Future Join ForEach ParallelTask BackgroundWorker ForkJoin Pipeline
14
Which abstraction to use? Consider data flow!
15
High-Level Abstractions Async [/Await] Future Join ForEach ParallelTask BackgroundWorker ForkJoin Pipeline Start background task and continue
16
Async [/Await]
17
High-Level Abstractions Async [/Await] Future Join ForEach ParallelTask BackgroundWorker ForkJoin Pipeline Start background calculation and retrieve the result
18
Future
19
High-Level Abstractions Async [/Await] Future Join ForEach ParallelTask BackgroundWorker ForkJoin Pipeline Start multiple background tasks [and wait]
20
Join
21
P ARTING N OTES
22
Keep in Mind Don’t parallelize everything Rethink the algorithm Data flow dictates the abstraction Measure the improvements Test, test and test
23
Code and Video www.omnithreadlibrary.com/webinars
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.