Skip to content

Commit

Permalink
Make Lock.protect raw
Browse files Browse the repository at this point in the history
- no longer decontainerize
- would fix lizmat/Object-Delayed#5
- **BUT** decontainerization was added specifically:
  Raku/old-issue-tracker#6573
- is spectest/stresstest/test clean

But perhaps we should make a Lock.protect-rw instead??
  • Loading branch information
lizmat committed Feb 16, 2020
1 parent 1a7f16b commit b90beba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.c/Lock.pm6
Expand Up @@ -22,10 +22,10 @@ my class Lock {

# use a multi to ensure LEAVE isn't run when bad args are given
proto method protect(|) {*}
multi method protect(Lock:D: &code) {
multi method protect(Lock:D: &code) is raw {
nqp::lock(self);
LEAVE nqp::unlock(self);
nqp::decont(code())
code()
}

method condition(Lock:D:) {
Expand Down

0 comments on commit b90beba

Please sign in to comment.