asynchronous 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTNkMmY0MjUwZmI4OTNhYThjYzcwZmFmYTJjN2U4MjNjNzZmZDJmYg==
4
+ ODFiY2RkZGRlOGIyZTRmZDA4NTIyNWY1OWY2ZjJhNjRiYmI3YjVmMQ==
5
5
  data.tar.gz: !binary |-
6
- ODQ3ZDc0YTU1Yzc0N2VjYWFjYTgyMzBmODBmNDkwYjEzOWZlZmY0Zg==
6
+ MTgwNmU5NWVkZmYyNGI0MTFhYTUyMjAwODE0ZDY1M2M3Nzc4MDBlZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OWQwOTg0MDVlZDVlMjQ2NTk4YjJjM2VhZDU2ZTZiMmI4OTAyZjhjYjk0N2Yy
10
- NWNhM2RmNDcxMjVlMTJiMjNlNTU4Y2M0ZDBhZWU1OTE5OTVkNGZkNGVkOWRi
11
- YWRkYzI5ZWE2OWE5MDVlNzNjYzBhMWRiYzQ5YzA3OTJlNTFkMTE=
9
+ ZjZjMzE2NjQxZmQ1MjMzZWY3MWNiOTNhMDFiMWUzNGMyNDI0MmNhN2U2YzFl
10
+ YmEyMGUzNjBjYmU0NDk1NzZhNjYyY2Y4YzM4ZWMxYjExNjhmYjdmNjQ5NWRj
11
+ Y2UxYTE3NmQzMTMyOTQ0N2E0YmZhZTE3ZWZiOGJiMTE1YzZlZTM=
12
12
  data.tar.gz: !binary |-
13
- ZGZkZmI1MGEwNWExMTRmNTMyM2M1NTIxMDdiOTQ5NjRmMmFlNmYwZWMwOWMw
14
- N2NmODk4ZTY5NTU5ZWYyZjFmMDIxZmMzODM1NWQ5M2Y0MDczMmJiNjE0ZThj
15
- YjIyMjQ4NmE4OTY5OTc2MTAyMzI5YzIzYjc3ZjU2MDVlMTg2YjI=
13
+ MTAyZjY2YTQyYzc3MDU1ZDFiODhiZjJiMTlhNjNmZmE3NmExZDIyZDAxMDMw
14
+ OGEzZjk2Y2ExZTM4MjYxOGFjNTllMjljNTFjNWMwZTZmNWFiZjk1YzM0MzA1
15
+ NzY5MmM5MDFjZWMyMzMxYWI5ZDY2NDIwMDYyNTIyMDk0NTYxMzA=
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- asynchronous
1
+ Asynchronous
2
2
  ============
3
3
 
4
4
  Asynchronous Patterns for Ruby Based on Pure MRI CRuby code
@@ -88,6 +88,10 @@ the usecase is simple like that:
88
88
  SharedMemory.anything_you_want_use_as_variable_name= {:some=>:object}
89
89
  SharedMemory.anything_you_want_use_as_variable_name #> {:some=>:object}
90
90
 
91
+ # or
92
+
93
+ shared_memory.anything_you_want_use_as_variable_name #> {:some=>:object}
94
+
91
95
  ```
92
96
 
93
97
  by default i set the memory allocation to 16Mb because it common usecase to me (MongoDB),
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.1.0
@@ -11,7 +11,7 @@ async :OS do
11
11
  end
12
12
 
13
13
  loop do
14
- if SharedMemory.test_value >= 10
14
+ if shared_memory.test_value >= 10
15
15
  Process.exit
16
16
  end
17
17
  puts SharedMemory.test_value
@@ -11,6 +11,7 @@
11
11
  # end
12
12
  #
13
13
  module Kernel
14
+
14
15
  def async(type= :Concurrency ,&block)
15
16
  case type.to_s.downcase[0]
16
17
  # Concurrency / VM / Green
@@ -30,4 +31,9 @@ module Kernel
30
31
 
31
32
  end
32
33
  end
34
+
35
+ def shared_memory
36
+ Asynchronous::SharedMemory
37
+ end unless method_defined? :shared_memory
38
+
33
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asynchronous
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi