nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
26 stars 15 forks source link

python3 GIL locking solution #1675

Closed excaliburtb closed 3 months ago

excaliburtb commented 3 months ago

Implemented use of the python GIL API to replace the less portable mutex solution.

excaliburtb commented 3 months ago

i titled it python3 but it still works with 2.7.18 as well

coveralls commented 3 months ago

Coverage Status

coverage: 55.86% (-0.05%) from 55.906% when pulling 499cb1f1c86be1ba6ca2e9b6aa5ba455c32256f7 on excaliburtb:fix_python_gil_locking into d4f92cc5015469ccb1a810b1d0681d2c6b866027 on nasa:master.

hchen99 commented 3 months ago

Thanks for the fix. According to https://docs.python.org/3/c-api/init.html#non-python-created-threads, for non python created threads, using GIL is the way suggested.