Sha256: 66fafe948bd1f483485549081a76942895596ae9105f2218eabea4b4126c9687
Contents?: true
Size: 353 Bytes
Versions: 1
Compression:
Stored size: 353 Bytes
Contents
# This is a bit of a contrived example, but this class always deadlocks if the secondary is run # without eventually running the primary. class AlwaysDeadlocks def initialize @primary_has_run = false end def call(is_primary:) if is_primary @primary_has_run = true else Thread.pass until @primary_has_run end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
thread_weaver-0.1.0 | examples/always_deadlocks.rb |