I'm having an issue where the attached code will always segfault on me when
I try to create a handle scope inside of a new boost thread.
Any pointers on what I'm doing wrong will be appreciated.
Thanks,
Ian
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
#include <v8.h>
#include <iostream>
#include <boost/thread/thread.hpp>
using namespace std;
using namespace v8;
void scope(int tid) {
cout << tid << endl;
HandleScope scope; // Segfaults here.
cout << tid << " Done" << endl;
return;
}
int main(int argc, char** argv) {
boost::thread* t1 = new boost::thread(&scope, 1);
t1->join();
delete(t1);
return 0;
}