micropython-lib
micropython-lib copied to clipboard
unix-ffi: Fixing behavior to avoid zombie threads.
This commit is fixing this issue: https://github.com/micropython/micropython-lib/issues/780 As discussed here https://github.com/orgs/micropython/discussions/13239
Now the pid of child thread will be stored and closed properly. Even with context manager.
bump up
It would be good to add a test for this functionality, that also helps with maintaining stability over time.
Other tests for the ffi module live in the micropython repo under tests/ports/unix
you could take one of the other ffi_ tests as the base, and add example code to it.
I'll update the PR. Thanks for the ideas, folks =)