amirka-async-fu 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +10 -1
- data/VERSION.yml +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -3,8 +3,12 @@
|
|
3
3
|
async-fu improve your code with abilities to run long task in threaded way
|
4
4
|
|
5
5
|
== Examples
|
6
|
+
|
6
7
|
=== Simple usage
|
7
8
|
|
9
|
+
require 'rubygems'
|
10
|
+
require 'async_fu'
|
11
|
+
|
8
12
|
class YourClass1
|
9
13
|
def hello
|
10
14
|
p 'start'
|
@@ -18,8 +22,12 @@ end
|
|
18
22
|
af = AsyncFu.new(YourClass1.new)
|
19
23
|
|
20
24
|
af.hello
|
25
|
+
|
21
26
|
=== Inheritance usage
|
22
27
|
|
28
|
+
require 'rubygems'
|
29
|
+
require 'async_fu'
|
30
|
+
|
23
31
|
class YourClass2 < AsyncFu
|
24
32
|
def hello
|
25
33
|
p 'start'
|
@@ -33,6 +41,7 @@ end
|
|
33
41
|
ai = YourClass2.new
|
34
42
|
|
35
43
|
ai.hello
|
44
|
+
|
36
45
|
=== Thread exit solution
|
37
46
|
|
38
47
|
You don't need more using join method to lock threads, if you not use it for some reasons.
|
@@ -52,7 +61,7 @@ If you don't need this futures, you can switch it off by using exit method of As
|
|
52
61
|
* add mixin style
|
53
62
|
|
54
63
|
YourClass
|
55
|
-
include async-fu
|
64
|
+
include async-fu
|
56
65
|
end
|
57
66
|
|
58
67
|
== Copyright
|
data/VERSION.yml
CHANGED