]> git.eshelyaron.com Git - sweep.git/commit
Improve top-level threads management and cleanup
authorEshel Yaron <me@eshelyaron.com>
Sat, 16 Sep 2023 18:50:47 +0000 (20:50 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 16 Sep 2023 18:50:47 +0000 (20:50 +0200)
commit3e61fbdd08320e0f40e0c9254245765fc263db85
tree091ef51a24bb0fb1a06beae2eeb055727887cb8e
parent292335770554abdab626694693e7528a88159651
Improve top-level threads management and cleanup

* sweep.pl (sweep_top_level_thread_buffer/2): Remove predicate.
(sweep_top_level_threads/2): Remove in favor of...
(sweep_list_threads/2): New predicate.
(sweep_accept_top_level_client/2)
(sweep_top_level_start_pty/2): Return new thread id.
(sweep_cleanup_threads/0,2)
(sweep_create_thread/2,3)
(sweep_thread_start/0)
(sweep_thread_at_exit/0)
(sweep_supervisor_start/1)
(sweep_supervisor_loop/1)
(sweep_kill_thread/2)
(sweep_cleanup_thread/1): New predicates.

* sweeprolog.el (sweeprolog-init): Arrange for Sweep to shutdown
gracefully when Emacs is killed.
(sweeprolog-maybe-kill-top-levels)
(sweeprolog-maybe-shutdown)
(sweeprolog-shutdown)
(sweeprolog-top-level-maybe-delete-process)
(sweeprolog-top-level-delete-process): New functions.
(sweeprolog-restart)
(sweeprolog-top-level-buffer): Adapt.
(sweeprolog-top-level--populate-thread-id): Remove function.
sweep.pl
sweeprolog.el