threadlock 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/threadlock.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22ab60659c189ff0003cbec95e7db3237fa68d1b
|
4
|
+
data.tar.gz: 26819e3a35e1df3250b9fec0d1a366638dc0794a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9c114c9c29918383d994d1898a1f8c03bd3a148a95497eb988ce24c4e2ee0a3de75a4e4b5f4e295f2e3719fa02c7b54d8b3d045444200316dcecc469e20286e
|
7
|
+
data.tar.gz: 053c3e0b3972a3d3553bd669eb3002afe2458157b2175f90fdd01ee7ed2678d1e91022244b79544cf3350d6559248ef5a1dd4cbd26ba2e85fe3841e6cddc668f
|
data/lib/threadlock.rb
CHANGED
@@ -18,10 +18,10 @@ def threadlock(*funcs, lock: :@___threadlock___)
|
|
18
18
|
class_eval\
|
19
19
|
("
|
20
20
|
alias :#{f2} :#{f}
|
21
|
-
def #{f}(*args)
|
21
|
+
def #{f}(*args, &block)
|
22
22
|
#{lock.to_s} ||= Monitor.new
|
23
23
|
#{lock.to_s}.synchronize do
|
24
|
-
#{f2}(*args)
|
24
|
+
#{f2}(*args, &block)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: threadlock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe McIlvain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: "Use the threadlock function in your class definition to automatically
|
14
14
|
run instance methods inside of an instance-wide re-entrant lock (Monitor). All
|