Search
21:04:13
stassats
the only thing destroy-thread can help test is asynchronous unwinds
21:05:34
phoe
to be clear, I'm not using destroy-thread for testing
21:05:37
phoe
I'm using it in application code
21:05:54
phoe
and I have just noticed why I have made a big mistake
21:13:22
phoe
Does executing a Lisp destroy-thread unwind its stack and execute all unwind-protect cleanup forms?
21:14:01
stassats
yes, unless it's in the middle of a cleanup form
21:17:11
phoe
just curious now - is there any way out of (tagbody :start (unwind-protect (loop) (go :start))) ?
21:18:06
stassats
you can just quit the thread
21:18:37
phoe
quit the thread? is there a function for that other than destroy-thread?
21:19:30
phoe
and if destroy-thread executes cleanup forms, then we go to :start and enter the loop anew
21:19:43
stassats
nobody writes code like that
21:19:53
phoe
yep, I purposefully wrote this to be malicious
23:24:30
stassats
wrote a tool for inspecting unwinds
23:24:36
stassats
(current-unwinds ) => (SWANK::EVAL-REGION SWANK-REPL::TRACK-PACKAGE SWANK:EVAL-FOR-EMACS SWANK::CALL-WITH-BINDINGS (FLET SB-UNIX::BODY :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) (FLET SB-UNIX::BODY :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) (FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) (FLET
23:24:36
stassats
"WITHOUT-INTERRUPTS-BODY-1" :IN SB-THREAD::CALL-WITH-MUTEX) SB-THREAD::CALL-WITH-MUTEX)
23:29:21
stassats
don't know what to use it for