forked from npatwardhan/ruby-parallel-forkmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEXAMPLES.yard
More file actions
40 lines (22 loc) · 964 Bytes
/
EXAMPLES.yard
File metadata and controls
40 lines (22 loc) · 964 Bytes
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
= Parallel::ForkManager Examples
The programs in the examples directory show the use of the Parallel::ForkManager
gem.
To run them from this directory use a command like:
ruby -Ilib examples/data_structures_advanced.rb
The programs are discussed below.
== examples/callbacks.rb
Example of a program using callbacks to get child exit codes.
{include:file:examples/callbacks.rb}
== data_structures_string.rb
In this simple example, each child sends back a string.
{include:file:examples/data_structures_string.rb}
== data_structures_advanced.rb
A second data structure retrieval example demonstrates how children
decide whether or not to send anything back, what to send and how the
parent should process whatever is retrieved.
{include:file:examples/data_structures_advanced.rb}
== parallel_http_get.rb
Use multiple workers to fetch data from URLs.
{include:file:examples/parallel_http_get.rb}
== use_pfm.rb
{include:file:examples/use_pfm.rb}