amirka-async-fu 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/README.rdoc +34 -36
  2. data/VERSION.yml +1 -1
  3. metadata +1 -1
@@ -6,41 +6,39 @@ async-fu improve your code with abilities to run long task in threaded way
6
6
 
7
7
  === Simple usage
8
8
 
9
- require 'rubygems'
10
- require 'async_fu'
11
-
12
- class YourClass1
13
- def hello
14
- p 'start'
15
- p 'list ' + Thread.list.join( ' ')
16
- p 'main ' + Thread.main.to_s
17
- p 'this ' + Thread.current.to_s
18
- p 'end'
19
- end
20
- end
21
-
22
- af = AsyncFu.new(YourClass1.new)
23
-
24
- af.hello
9
+ require 'rubygems'
10
+ require 'async_fu'
11
+
12
+ class YourClass1
13
+ def hello
14
+ p 'start'
15
+ p 'list ' + Thread.list.join( ' ')
16
+ p 'main ' + Thread.main.to_s
17
+ p 'this ' + Thread.current.to_s
18
+ p 'end'
19
+ end
20
+ end
21
+
22
+ af = AsyncFu.new(YourClass1.new)
23
+ af.hello
25
24
 
26
25
  === Inheritance usage
27
26
 
28
- require 'rubygems'
29
- require 'async_fu'
30
-
31
- class YourClass2 < AsyncFu
32
- def hello
33
- p 'start'
34
- p 'list ' + Thread.list.join( ' ')
35
- p 'main ' + Thread.main.to_s
36
- p 'this ' + Thread.current.to_s
37
- p 'end'
38
- end
39
- end
40
-
41
- ai = YourClass2.new
42
-
43
- ai.hello
27
+ require 'rubygems'
28
+ require 'async_fu'
29
+
30
+ class YourClass2 < AsyncFu
31
+ def hello
32
+ p 'start'
33
+ p 'list ' + Thread.list.join( ' ')
34
+ p 'main ' + Thread.main.to_s
35
+ p 'this ' + Thread.current.to_s
36
+ p 'end'
37
+ end
38
+ end
39
+
40
+ ai = YourClass2.new
41
+ ai.hello
44
42
 
45
43
  === Thread exit solution
46
44
 
@@ -60,10 +58,10 @@ If you don't need this futures, you can switch it off by using exit method of As
60
58
 
61
59
  * add mixin style
62
60
 
63
- YourClass
64
- include async-fu
65
- end
61
+ class YourClass
62
+ include async-fu
63
+ end
66
64
 
67
65
  == Copyright
68
66
 
69
- Copyright (c) 2009 Amir Mamedov. See LICENSE for details.
67
+ Copyright (c) 2009 Amir Mamedov. See LICENSE for details.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 1
4
- :patch: 3
4
+ :patch: 4
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amirka-async-fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amir Mamedov