From 1a64cbed776f5011b685b7d32bc4c217f1ae4264 Mon Sep 17 00:00:00 2001 From: tkorvola Date: Wed, 1 Feb 2017 19:48:01 +0200 Subject: [PATCH] Mind the threads in writeSCL. Both JNIEnv and PyThreadState are per thread. So check that we are in the main thread before messing with JNIEnv. Writes from other threads (possibly created in Python) are just dropped; those seem difficult to do right. Also unlock GIL while calling the Java method. Change-Id: I49a447e22ba4411800445f7149f5bc257a082e4f --- .../jnipython.dll | Bin 35328 -> 66048 bytes .../src/sclpy.c | 23 ++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/org.simantics.pythonlink.win32.x86_64/jnipython.dll b/org.simantics.pythonlink.win32.x86_64/jnipython.dll index e5339466a7dc2c6854d07f4d9b6f02b02425d111..ab792ab08a7ca26dd2a50f39b3abb8bc2f709548 100644 GIT binary patch literal 66048 zcmeHw3w%_?+4lsp5FsH^TtzK<)S&TFhz4mCup3C|i7vWAkW|nlBpVXVWxLtcV7-6= zAuh4e(n_sbyyNAyRILT-B`5{FHlnSlZ`&xg-89%@^;4>?`~9D1X3n0yY*U)5+-S2Z;?2aH8t!yjxi>YI$>3+Eb*%{AVMSy`iU73p(tdG4O8_rCs- zep*(|_^1`{z0a0@^nJjp#@YN{)p((Lznb4yJ=DE-376~s=o^gp{g1xK@H~a*W;mz5 zx{hdTO*|z+)Z92iyms8JVm%()p9}6XQKE@@0~tMd zNZ1{CY=16LnCO#;nIn(^T}1}q2R0-`T|}>5;>{h41lUL%4!8%8?axK@{N9GVB}c{<{XLO+A|QW%0^I)hSPi3 zWeEP|MDXS;1jkK5aQS%%enZ7_jz;jsLNDH67QUc$h#{Rv$c1Ky^Sajr$h&j%!!7@bL{K147f6nO zvxPr10bfd;$K)c;fHO_>ORv>zn|{w<(7Lmi&qo)Cw>#upDZPapEAd8(7P>nio4bST z(BUk3g)&#?u0p|xbNAtCVntW*M4jE)nC z_}PeOuXqQP$bK-j0E1oVoJssbW#@98=kCaQ1$pic#}Y;<%S9I9b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k OTh`$HyU+hU3H&d?L$FT( diff --git a/org.simantics.pythonlink.win32.x86_64/src/sclpy.c b/org.simantics.pythonlink.win32.x86_64/src/sclpy.c index 686221e..428a45a 100644 --- a/org.simantics.pythonlink.win32.x86_64/src/sclpy.c +++ b/org.simantics.pythonlink.win32.x86_64/src/sclpy.c @@ -53,19 +53,26 @@ writeToSCL(PyObject *self, PyObject *args) Py_UNICODE *what; Py_ssize_t length; if (!PyArg_ParseTuple(args, "u#", &what, &length)) - return Py_BuildValue(""); + Py_RETURN_NONE; { - jclass writerClass = (*env)->FindClass(env, WRITER_CLASS); - jmethodID writeMethod = (*env)->GetMethodID(env, writerClass, "write", "([CII)V"); - jcharArray chars = (*env)->NewCharArray(env, (jsize)length); - - (*env)->SetCharArrayRegion(env, chars, 0, length, what); - (*env)->CallVoidMethod(env, sclWriter, writeMethod, chars, 0, length); + PyThreadState *my_ts = PyThreadState_Get(); + if (my_ts == main_ts) { + jclass writerClass = (*env)->FindClass(env, WRITER_CLASS); + jmethodID writeMethod = (*env)->GetMethodID(env, writerClass, "write", "([CII)V"); + jcharArray chars = (*env)->NewCharArray(env, (jsize)length); + + (*env)->SetCharArrayRegion(env, chars, 0, length, what); + Py_BEGIN_ALLOW_THREADS + (*env)->CallVoidMethod(env, sclWriter, writeMethod, chars, 0, length); + Py_END_ALLOW_THREADS + } else { + //TODO + } } } - return Py_BuildValue(""); + Py_RETURN_NONE; } static PyMethodDef sclWriterMethods[] = { -- 2.47.1