Skip to content

Commit

Permalink
Fix chicken/egg problem with Lock::Async::Holder
Browse files Browse the repository at this point in the history
Trying to call .new at compile time on a class that refers to an outer
class that has not been composed yet, explodes at least during setting
compilation (without much useful feedback).

Since the .new was without parameters, a simple nqp::create is enough.

This allows setting compilation to complete with auto-generated BUILDALL
installed.  But "make install" still fails  :-(
  • Loading branch information
lizmat committed Sep 28, 2017
1 parent 43c348a commit 31a03a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Lock/Async.pm
Expand Up @@ -49,7 +49,7 @@ my class Lock::Async {

# Base states for Holder
my constant NO_HOLDER = Holder;
my constant SINGLE_HOLDER = Holder.new;
my constant SINGLE_HOLDER = nqp::create(Holder);

# The current holder record, with waiters queue, of the lock.
has Holder $!holder = Holder;
Expand Down

0 comments on commit 31a03a4

Please sign in to comment.