|
38 | 38 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
39 | 39 | * SOFTWARE.
|
40 | 40 | */
|
| 41 | +// skip GIL |
41 | 42 | package com.oracle.graal.python.builtins.objects.cext.capi;
|
42 | 43 |
|
43 |
| -import com.oracle.graal.python.runtime.GilNode; |
44 |
| -import com.oracle.truffle.api.dsl.Cached; |
45 |
| -import com.oracle.truffle.api.dsl.Cached.Exclusive; |
46 | 44 | import com.oracle.truffle.api.interop.ArityException;
|
47 | 45 | import com.oracle.truffle.api.interop.InteropLibrary;
|
48 | 46 | import com.oracle.truffle.api.interop.TruffleObject;
|
@@ -72,15 +70,10 @@ boolean isExecutable() {
|
72 | 70 | @ExportMessage
|
73 | 71 | Object execute(Object[] arguments,
|
74 | 72 | @CachedLibrary("this.nativeFunction") InteropLibrary nativeFunctionLib,
|
75 |
| - @CachedLibrary("this.resultConverter") InteropLibrary resultConverterLib, @Exclusive @Cached GilNode gil) |
| 73 | + @CachedLibrary("this.resultConverter") InteropLibrary resultConverterLib) |
76 | 74 | throws ArityException, UnsupportedTypeException, UnsupportedMessageException {
|
77 |
| - boolean mustRelease = gil.acquire(); |
78 |
| - try { |
79 |
| - Object res = nativeFunctionLib.execute(nativeFunction, arguments); |
80 |
| - return resultConverterLib.execute(resultConverter, res); |
81 |
| - } finally { |
82 |
| - gil.release(mustRelease); |
83 |
| - } |
| 75 | + Object res = nativeFunctionLib.execute(nativeFunction, arguments); |
| 76 | + return resultConverterLib.execute(resultConverter, res); |
84 | 77 | }
|
85 | 78 |
|
86 | 79 | public Object getNativeFunction() {
|
|
0 commit comments