google / langfun

OO for LLMs
Apache License 2.0
100 stars 17 forks source link

Fix memory leak in `lf.coding.run`. #237

Closed copybara-service[bot] closed 1 month ago

copybara-service[bot] commented 1 month ago

Fix memory leak in lf.coding.run.

Process.terminate sends SIGTERM to the subprocess for graceful shutdown, which will wait the process to release its own resource. However, for code that has infinite loops, SIGTERM cannot end the process as desired. Instead SIGKILL will do the work for us.