PyMiniRacer icon indicating copy to clipboard operation
PyMiniRacer copied to clipboard

Can't stop this program

Open beesound opened this issue 3 years ago • 1 comments

Steps to reproduce

from py_mini_racer import py_mini_racer ctx = py_mini_racer.MiniRacer() print(ctx.eval('1+1')) del ctx pmr

Expected behavior

This program can't stop, it seems that some thread is not over.

Actual behavior

Tell us what happens instead

System configuration

PyMiniRacer version: 0.5.0 window 7

Python version: 3.74

beesound avatar Mar 16 '21 15:03 beesound

Hello, thanks for reporting this issue. PyMiniRacer uses the ctypes module and releases the GIL when calling the JavaScript VM. It can lead to this issue (impossible to interrupt the function) when a long running JavaScript function is executed on a single thread application.

nizox avatar May 10 '21 10:05 nizox