Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
lock and unlock for IO::Handle
lock's $flag argument might need some more design
  • Loading branch information
niner committed Nov 15, 2015
1 parent 47add65 commit 2163a7e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/IO/Handle.pm
Expand Up @@ -862,6 +862,14 @@ my class IO::Handle does IO {
self.opened && nqp::p6bool($!PIO.isatty)
}

method lock(IO::Handle:D: Int:D $flag) {
nqp::lockfh($!PIO, $flag)
}

method unlock(IO::Handle:D: --> True) {
nqp::unlockfh($!PIO);
}


proto method print(|) { * }
multi method print(IO::Handle:D: str:D \x --> True) {
Expand Down

0 comments on commit 2163a7e

Please sign in to comment.