Skip to content

Commit d1de2eb

Browse files
committed
Fix: macro 'class_property' must be defined
1 parent 836a51b commit d1de2eb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/crystal/once.cr

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@
2727

2828
{% if flag?(:preview_mt) || flag?(:win32) %}
2929
@@once_mutex = uninitialized Mutex
30-
class_property once_mutex : Mutex
30+
31+
def self.once_mutex : Mutex
32+
@@once_mutex
33+
end
34+
35+
def self.once_mutex=(@@once_mutex : Mutex)
36+
end
3137
{% end %}
3238

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

0 commit comments

Comments
 (0)