wrappers 0.0.1
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.
- checksums.yaml +7 -0
- data/lib/wrappers.rb +35 -0
- metadata +43 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: d6a66b5438f9167586c32fb88be026371ab36477
|
|
4
|
+
data.tar.gz: a05e9b56d572cde36ea976c16b4a9534fc3f81fb
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 2e4c4d4a797566fc8fa26a2afe54ec1216c10f4e3025b6451a50c1fac13b582abaf8b95382abefc33c25b87e45b3ab78e431dda174141813d6bcca8d189aeb4b
|
|
7
|
+
data.tar.gz: c422d9c11be02351299bcc55fbb29f8afdc53bd4d3eb9e0eb054e68d495cf22ccb2e6c8851ed146d1f6b68735ca28d8a1b6f56dbc058e3c75a9a088da532cbb4
|
data/lib/wrappers.rb
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Wrappers
|
|
2
|
+
require 'forwardable'
|
|
3
|
+
|
|
4
|
+
def self.sleep(duration)
|
|
5
|
+
Kernel::sleep duration
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class Mutex
|
|
9
|
+
extend Forwardable
|
|
10
|
+
|
|
11
|
+
def_delegator :@mutex, :lock
|
|
12
|
+
def_delegator :@mutex, :locked?
|
|
13
|
+
def_delegator :@mutex, :owned?
|
|
14
|
+
def_delegator :@mutex, :sleep
|
|
15
|
+
def_delegator :@mutex, :synchronize
|
|
16
|
+
def_delegator :@mutex, :try_lock
|
|
17
|
+
def_delegator :@mutex, :unlock
|
|
18
|
+
|
|
19
|
+
def initialize
|
|
20
|
+
@mutex = Thread::Mutex.new
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
class ConditionVariable
|
|
25
|
+
extend Forwardable
|
|
26
|
+
|
|
27
|
+
def_delegator :@condition_variable, :broadcast
|
|
28
|
+
def_delegator :@condition_variable, :signal
|
|
29
|
+
def_delegator :@condition_variable, :wait
|
|
30
|
+
|
|
31
|
+
def initialize
|
|
32
|
+
@condition_variable = Thread::ConditionVariable.new
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: wrappers
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Tom Van Eyck
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2018-04-08 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description:
|
|
14
|
+
email:
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- lib/wrappers.rb
|
|
20
|
+
homepage:
|
|
21
|
+
licenses: []
|
|
22
|
+
metadata: {}
|
|
23
|
+
post_install_message:
|
|
24
|
+
rdoc_options: []
|
|
25
|
+
require_paths:
|
|
26
|
+
- lib
|
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
28
|
+
requirements:
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '0'
|
|
32
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
33
|
+
requirements:
|
|
34
|
+
- - ">="
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '0'
|
|
37
|
+
requirements: []
|
|
38
|
+
rubyforge_project:
|
|
39
|
+
rubygems_version: 2.6.11
|
|
40
|
+
signing_key:
|
|
41
|
+
specification_version: 4
|
|
42
|
+
summary: Wrappers for sleep, threads, and condition variables to help with profiling.
|
|
43
|
+
test_files: []
|