Tutorials are not ready yet ...

... so for the time being you should start by reading OmniThreadLibrary-related articles on my blog.

The simplest possible OTL threading code

Hello, World example

How to (not) create a task

Bidirectional communication

Message-driven worker, the OTL way

Registering additional communication channels

Processing Windows messages

Background file scanning

Building a connection pool

Alternatively, you can open all my OmniThreadLibrary related articles in one go.

OmniThreadLibraryInternals

Task control interface

Communication subsystem

Lock-free stack tetralogy: Implementing lock-free stack, Lock-free stack problem, A working lock-free stack implementation, Lock-free queue

Containers

Calling OmniThreadLibrary methods by name

Using RTTI to call task methods

Blocking collection trilogy: Inverse semaphore, Dynamically allocated queue, Blocking collection

Demos

0_Beep

The simplest possible OmniThreadLibrary threading code.

1_HelloWorld

Threaded "Hello, World" with TOmniEventMonitor component created in runtime.

2_TwoWayHello

Hello, World with bidirectional communication; TOmniEventMonitor created in runtime.

3_HelloWorld_with_package

Threaded "Hello, World" with TOmniEventMonitor component on the form.

4_TwoWayHello_with_package

Hello, World with bidirectional communication; TOmniEventMonitor component on the form.

5_TwoWayHello_without_loop

Hello, World with bidirectional communication, the OTL way.

6_TwoWayHello_with_object_worker

Obsolete, almost totally equal to the demo 5_TwoWayHello_without_loop.

7_InitTest

Demonstrates .WaitForInit, .ExitCode, .ExitMessage, and .SetPriority.

8_RegisterComm

Demonstrates creation of additional communication channels.

9_Communications

Simple communication subsystem tester.

10_Containers

Full-blown communication subsystem tester. Used to verify correctness of the lock-free code.

11_ThreadPool

Thread pool demo.

12_Lock

Demonstrates .WithLock.

13_Exceptions

Demonstrates exception catching.

14_TerminateWhen

Demonstrates .TerminateWhen and .WithCounter.

15_TaskGroup

Task group demo.

16_ChainTo

Demonstrates .ChainTo.

17_MsgWait

Demonstrates .MsgWait and Windows message processing inside tasks.

18_StringMsgDispatch

Calling task methods by name and address.

19_StringMsgBenchmark

Benchmarks various was of task method invokation.

20_QuickSort

Parallel QuickSort demo.

21_Anonymous_methods

Demonstrates the use of anonymous methods as task workers in Delphi 2009.

22_Termination

Tests for .Terminate and .Terminated.

23_BackgroundFileSearch

Demonstrates file scanning in a background thread.

24_ConnectionPool

Demonstrates how to create a connection pool with OmniThreadLibrary.

25_WaitableComm

Demo for ReceiveWait and SendWait.

26_MultiEventMonitor

How to run multiple event monitors in parallel.

27_RecursiveTree

Parallel tree processing.

 28_Hooks

Demo for the new hook system.

29_ImplicitEventMonitor

Demo for OnMessage and OnTerminated, named method approach.

30_AnonymousEventMonitor

Demo for OnMessage and OnTerminated, anonymous method approach.

31_WaitableObjects

Demo for the new RegisterWaitObject/UnregisterWaitObject API.

32_Queue

Stress test for new TOmniBaseQueue and TOmniQueue.

33_BlockingCollection

Stress test for new TOmniBlockingCollection, also demoes the use of Environment to set process affinity.

34_TreeScan

Parallel tree scan using TOmniBlockingCollection.

35_ParallelFor

Parallel tree scan using Parallel.ForEach (Delphi 2009 and newer).

36_ParallelAggregate

Parallel calculations using Parallel.ForEach.Aggregate (Delphi 2009 and newer).