fogleman / sdf

Simple SDF mesh generation in Python
MIT License
1.61k stars 132 forks source link

ThreadPool not closed #16

Open thegnarwhals opened 3 years ago

thegnarwhals commented 3 years ago

Love this project! A small issue: in mesh.py the ThreadPool is not closed, resulting in the following warning when running under pytest

ResourceWarning: unclosed running multiprocessing pool <multiprocessing.pool.ThreadPool state=RUN pool_size=1>

This can be avoided by using the pool under the context management protocol

with ThreadPool(workers) as pool: