Tormalon has asked for the wisdom of the Perl Monks concerning the following question:
Perl code:SV* myfunc() PREINIT: HV *hash; CODE: hash = newHV(); RETVAL = newRV_noinc((SV*)hash); OUTPUT: RETVAL
The output:#!/usr/bin/perl -w use strict; use warnings; use threads; use threads::shared; use Data::Dumper; use lib qw|. t ../blib/arch ../blib/lib|; use mymodule; use Devel::Peek; use Clone; my $d : shared; $d = mymodule::myfunc();
Invalid value for shared scalar at ./a.pl line 15.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to make thread-save data on C API
by BrowserUk (Patriarch) on Sep 20, 2013 at 12:14 UTC | |
by Tormalon (Initiate) on Sep 20, 2013 at 14:04 UTC | |
by BrowserUk (Patriarch) on Sep 20, 2013 at 15:33 UTC |