quack_concurrency 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7933176e96ff2045aa5e480dcdfc5682bfc4e3e1ce860e9a1810c08a0f1b1024
4
- data.tar.gz: 7fa030e38a160f8a136198af6f0fada02de1974c81a06576d1b0cb62934ad230
3
+ metadata.gz: 367f0d058fbce805b9f2eb40c2905b21682da792df0d8d485aaf4e677bdee7b1
4
+ data.tar.gz: 0b598b37c585c3613dd6c423344160412cc2fc84d7afe5efad2c447473f3ee69
5
5
  SHA512:
6
- metadata.gz: a4b9c81683dae54bc82d8db1d9f551635d18bdb0028135483ddaacdfbffdde91f1295d5f5b22498c92ff85bab4fcb1c691cbca61d594bc5d5c62b76503d23842
7
- data.tar.gz: 3b474d262f7fa0227f6aa7c25488fb2bae135c5f0ebe4372a79000745143b0e593faaf807e200a1b52309a95cb664e66f580a077af1233c924360e44cb578181
6
+ metadata.gz: 5516ea7ae5481ff84a9592f3e2df9419b285d22d3c2fd9563e31974a93b0725fa8944929f1d6fe6ca199c477b72d991b9af02caf46c9c89d41f2eed0b7d906d9
7
+ data.tar.gz: ffbf811448df7077667fdbc26f0e84a4ba6aa5b9e78c81afe7d163bd279d0a3cdb55b84818eeb080bdee875b9c8484a64f0043f3574b073ba7a7fb8b25814c7e
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Quack Concurrency
2
- This Ruby Gem offers a few concurrency tools that could also be found in [*Concurrent Ruby*](https://github.com/ruby-concurrency/concurrent-ruby). However, all of *Quack Concurrency's* tools will accept duck types of Ruby's core classes to adjust the blocking behaviour of the tools. The tools include: `Future`, `Queue`, `ReentrantMutex`, `Semaphore` and `Waiter`. Each tool will accept a duck type for `ConditionVariable` and `Mutex`. If none are given `::ConditionVariable` and `::Mutex` are used by default. *TODO: list some projects useing it*.
2
+ This Ruby Gem offers a few concurrency tools that could also be found in [*Concurrent Ruby*](https://github.com/ruby-concurrency/concurrent-ruby). However, all of *Quack Concurrency's* tools will tolerate duck types of Ruby's core classes to adjust the blocking behaviour of the tools. The tools include: `ConditionVariable`, `Future`, `Mutex`, `Queue`, `ReentrantMutex`, `UninterruptibleConditionVariable` and `UninterruptibleSleeper`. The tools will accept duck types for `Thread` and `Kernel`. *TODO: list some projects useing it*.
3
3
 
4
4
  # Install
5
5
  `gem install quack_concurrency`
@@ -1,4 +1,7 @@
1
1
  module QuackConcurrency
2
+
3
+ # Unlike `::ConditionVariable` {UninterruptibleConditionVariable} will
4
+ # safely sleep a `Thread`s. Any calls to `Thread#run` directly, will be ignored.
2
5
  class UninterruptibleConditionVariable
3
6
 
4
7
  def initialize
@@ -1,4 +1,9 @@
1
1
  module QuackConcurrency
2
+
3
+ # An {UninterruptibleSleeper} can be used to safely sleep a `Thread`.
4
+ # Unlike simply calling `Thread#sleep`, {#stop_thread} will ensure that only
5
+ # calling {#run_thread} on this {UninterruptibleSleeper} will wake the `Thread`.
6
+ # Any call to `Thread#run` directly, will be ignored.
2
7
  class UninterruptibleSleeper
3
8
 
4
9
  def self.for_current
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quack_concurrency
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Fors