struct Syn::Core::Once

Overview

Similar to AtomicLock but limited to a single usage: prevent a block of code to be invoked more than once, for example executing an initializer at most once.

Relies on :sequentially_consistent memory ordering.

Defined in:

core/once.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def call(&) : Nil #

[View source]