On Thu, Apr 9, 2009 at 9:10 PM, Sébastien <[email protected]> wrote: > result->Set(JS_str("callback"),callback); > posix_pthread_create_callback((void*)*result); > pthread_create(thread, NULL, posix_pthread_create_callback, > (void*)*result);
*If* my understanding of the garbage collector is correct, the address of a given GC-able object can change during its lifetime (moved around within the gc pools), and thus (*result) may not be valid when it is referenced by the threaded code. AFAIK, the only v8 type for which we can get any sort of persistent per-object handle is External, using External::Value(). And even that is not guaranteed to be a stable if the native memory can possibly be realloc()ed. In any case, if you can figure out how to implement this, PLEASE post the results - i'd love to see it working. i took a crack at the problem a few weeks ago and failed miserably. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
