Skip to content

Commit

Permalink
Use a little more binding in Lock::Async
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jan 15, 2018
1 parent eeb3cc7 commit 2130c09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Lock/Async.pm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ my class Lock::Async {
if $holder.DEFINITE {
my $p := Promise.new;
my $v := $p.vow;
my $holder-update = $holder.queue-vow($v);
my $holder-update := $holder.queue-vow($v);
if cas($!holder, $holder, $holder-update) =:= $holder {
return $p;
}
Expand Down Expand Up @@ -134,7 +134,7 @@ my class Lock::Async {
# later on. Returns Nil if the code was run now (maybe after blocking), or
# a Promise if it was queued for running later.
method protect-or-queue-on-recursion(Lock::Async:D: &code) {
my $try-acquire = self.lock();
my $try-acquire := self.lock();
if $try-acquire {
# We could acquire the lock. Run the code right now.
LEAVE self.unlock();
Expand Down

0 comments on commit 2130c09

Please sign in to comment.