On Thu, Apr 11, 2013 at 4:54 PM, Jerry Yin <[email protected]> wrote:
> I think I would like to copying the Value and store the Value to a place
> that other thread can access. But I don't know how to make that kind of
> copy.
> Below is my case:
> I have some other thread in the addon, and I have to call some APIs on those
> thread. The parameters I'm using to call those API come from the javascript.
> I just want to copy those parameters, for instance, copying v8:String,
> v8:Int32
>
> Do you have any code examples on copying those value, so any other thread
> can access them at any time.

int32_t num = val->Int32Value();
String::Utf8Value str(val);
char* copy = strdup(*str);
// etc.

The add-ons documentation has more snippets you can look at.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to