in reply to Re: How to make thread-save data on C API
in thread How to make thread-save data on C API

Thanks for the info. Unfortunately, the SvSHARE does not work for me - I always receive empty HASHREF:
rt = newHV(); SvSHARE((SV*)rt); sv = newSViv(42); //SvSHARE(sv); hv_stores(rt, "fe", sv); ... ST(i) = sv_2mortal((SV*)newRV_noinc((SV*)rt)); XSRETURN(4); --- result for this tuple: $VAR1 = {};
So, I have shared HASH, but without any contents inside hash... I'll use shared_clone, but I think I can reproduce/clone the shared_clone source code...

Replies are listed 'Best First'.
Re^3: How to make thread-save data on C API
by BrowserUk (Patriarch) on Sep 20, 2013 at 15:33 UTC
    So, I have shared HASH, but without any contents inside hash

    No. I can't make it work either :(


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.