Skip to content

Commit

Permalink
Fix: macro 'class_property' must be defined
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbaddaden committed Jan 9, 2025
1 parent 836a51b commit d1de2eb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/crystal/once.cr
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@

{% if flag?(:preview_mt) || flag?(:win32) %}
@@once_mutex = uninitialized Mutex
class_property once_mutex : Mutex

def self.once_mutex : Mutex
@@once_mutex
end

def self.once_mutex=(@@once_mutex : Mutex)
end
{% end %}

# Using @[NoInline] so LLVM optimizes for the hot path (var already
Expand Down

0 comments on commit d1de2eb

Please sign in to comment.