This project is closed and read-only.
Bug #882 ยป sync.rb-1.8.6-fix.diff
| sync.rb 2007-05-09 01:04:37.000000000 +0100 | ||
|---|---|---|
|
# exceptions
|
||
|
class Err < StandardError
|
||
|
def Err.Fail(*opt)
|
||
|
Thread.critical = false
|
||
|
fail self, sprintf(self::Message, *opt)
|
||
|
end
|
||
|
|
||
| ... | ... | |
|
|
||
|
# locking methods.
|
||
|
def sync_try_lock(mode = EX)
|
||
|
return unlock if sync_mode == UN
|
||
|
return unlock if mode == UN
|
||
|
|
||
|
Thread.critical = true
|
||
|
ret = sync_try_lock_sub(sync_mode)
|
||
|
ret = sync_try_lock_sub(mode)
|
||
|
Thread.critical = false
|
||
|
ret
|
||
|
end
|
||