in reply to Re^3: XS: exposing C++ library constant as package variable
in thread XS: exposing C++ library constant as package variable
$ perl -le "sub LUCY(){66} use threads; async{ print join q/ /, thread +s->tid, LUCY(), \&LUCY() } for 1..3; sleep 1; " 1 66 SCALAR(0xb6c0d4) 2 66 SCALAR(0xbf7144) 3 66 SCALAR(0xc7eebc) Perl exited with active threads: 0 running and unjoined 3 finished and unjoined 0 running and detached
$ perl -le "use Readonly; Readonly::Scalar $LU => 66; use threads; asy +nc{ print join q/ /, threads->tid, $LU, \$LU } for 1..3; sleep 1; " 1 66 SCALAR(0xb84cfc) 2 66 SCALAR(0xc1bbec) 3 66 SCALAR(0x10af0b4) Perl exited with active threads: 0 running and unjoined 3 finished and unjoined 0 running and detached
|
|---|