Skip to content

Commit

Permalink
Thread safe (#20)
Browse files Browse the repository at this point in the history
* working on thread safe calls

* spelling

* check if last argument to call is a function

* moving around locks

* use py_context class

* use mutex, dont know if this works on windows

* remove mutex

* init threads

* use cwd for worker script

* trying to get multiprocessing to work

* remove comments
  • Loading branch information
fridgerator authored Oct 12, 2019
1 parent 1dc1a3e commit b36a6f4
Show file tree
Hide file tree
Showing 7 changed files with 349 additions and 155 deletions.
2 changes: 1 addition & 1 deletion src/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ PyObject *BuildPyArray(v8::Local<v8::Value> arg)
return list;
}

PyObject *BuildPyArgs(const Nan::FunctionCallbackInfo<v8::Value> &args)
PyObject *BuildPyArgs(const v8::FunctionCallbackInfo<v8::Value>& args)
{
// Arguments length minus 2: one for function name, one for js callback
PyObject *pArgs = PyTuple_New(args.Length() - 2);
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// v8 to Python
PyObject *BuildPyArray(v8::Local<v8::Value> arg);
PyObject *BuildPyDict(v8::Local<v8::Value> arg);
PyObject *BuildPyArgs(const Nan::FunctionCallbackInfo<v8::Value> &args);
PyObject *BuildPyArgs(const v8::FunctionCallbackInfo<v8::Value>& args);

// Python to v8
v8::Local<v8::Array> BuildV8Array(PyObject *obj);
Expand Down
Loading

0 comments on commit b36a6f4

Please sign in to comment.