Searched refs:Semaphore (Results 1 - 8 of 8) sorted by relevance

/ontohub/spec/lib/
H A Dsemaphore_spec.rb3 describe Semaphore do
8 expect(Semaphore.locked?(@key)).to be(false)
15 Semaphore.exclusively(@key, expiration: 1) do
20 semaphore_locked = Semaphore.locked?(@key, expiration: 1)
30 Semaphore.exclusively(@key) { nil }
31 expect(Semaphore.locked?(@key)).to be(false)
35 let(:sema) { Semaphore.new(@key) }
53 expect(Semaphore.exclusively(@key) { :result }).to eq(:result)
/ontohub/lib/
H A Dhets_instance_force_free_worker.rb5 Semaphore.exclusively(HetsInstance::MUTEX_KEY,
H A Dsequential_ontology_parsing_worker.rb10 Semaphore.exclusively(MUTEX_KEY, expiration: MUTEX_EXPIRATION) do
H A Dsemaphore.rb1 # The Semaphore class allows to lock resources. The processes are blocked, i.e.
5 # It is based on Redis::Semaphore and can be extended to allow multiple
9 # Expiration is given in seconds. Can be nil. If set, the Semaphore will unlock
13 class Semaphore class
60 Redis::Semaphore.new(lock_key,
H A Dproof_evaluation_state_updater.rb19 Semaphore.exclusively(theorem.locid, expiration: MUTEX_EXPIRATION) do
/ontohub/lib/hets/
H A Dconcurrent_evaluator.rb35 semaphore = Semaphore.new(key, expiration: EVALUATION_MUTEX_EXPIRATION)
36 Semaphore.exclusively(CHECK_MUTEX_KEY,
38 raise AlreadyEvaluatingError if Semaphore.locked?(key)
/ontohub/app/models/
H A Dhets_instance.rb85 ::Semaphore.exclusively(MUTEX_KEY, expiration: MUTEX_EXPIRATION) { yield }
H A Dsine_axiom_selection.rb28 Semaphore.exclusively(lock_key, expiration: MUTEX_EXPIRATION) do

Completed in 312 milliseconds