class PgORM::PgAdvisoryLock

Overview

Postgresql Advisory Locks for ::PgORM

Included Modules

Extended Modules

Defined in:

pg-orm/lock.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(key : String, timeout : Time::Span | Nil = nil) #

[View source]

Class Method Detail

def self.count #

[View source]

Instance Method Detail

def lock(timeout : Time::Span = self.timeout) : Nil #

[View source]
def locked? : Bool #

[View source]
def synchronize(**options, &) #

[View source]
def timeout : Time::Span #

Lock acquisition timeout


[View source]
def timeout=(timeout : Time::Span) #

Lock acquisition timeout


[View source]
def try_lock #

[View source]
def unlock : Nil #

[View source]