Mercurial > hg > Others > Rakudo
view src/core.c/HyperConfiguration.pm6 @ 0:c341f82e7ad7 default tip
Rakudo branch in cr.ie.u-ryukyu.ac.jp
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 26 Dec 2019 16:50:27 +0900 |
parents | |
children |
line wrap: on
line source
my class X::Invalid::Value { ... } # Configuration for hyper/race, controlling how we parallelize (number of # items at a time, and number of threads). my class HyperConfiguration { has int $.batch; has Int $.degree; submethod TWEAK(:$method) { nqp::if( $!batch <= 0, X::Invalid::Value.new(:$method,:name<batch>,:value($!batch)).throw, nqp::if( $!degree <= 0, X::Invalid::Value.new(:$method,:name<degree>,:value($!degree)).throw, Nil ) ) } } # vim: ft=perl6 expandtab sw=4