blob: f02bd65b73cd6c5ac790b0f2ea314d5078e9b372 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
ThreadPool example for RT-Notification
======================================
This example has 1 Supplier and 2 Consumers.
The supplier sends an different event to each of the consumers in a
supplier thread continuously.
One of the consumers has 1 second delay in its push method.
let us call it the "slow" consumer and the other consumer - the "fast" consumer.
If no threadpools are used then the throughput of both consumers is ~1
event per second.
We deploy a threadpool at each proxysupplier.
This causes each consumer to have a seperate data path.
Hence the fast consumer finishes first without any interference from
the slow consumer.
Command Line Options
====================
Supplier:
--------
-Consumers count
-Event_Channel_ThreradPool static_threads
-ProxyConsumer_ThreadPool static_threads
-IORoutput ior_file
-MaxEvents count
Consumer:
--------
-ProxySupplier_ThreadPool static_threads
-MaxEvents count
-Delay seconds
Running the example
===================
Simply run the run_test.pl file.
The run_test.pl file has options that can be modified to run the
example with threadpools deployed at different points.
|