Helmut Eller e9626484@stud3.tuwien.ac.at writes:
The sldb-loop looked like this:
(send-to-emacs '(:initialize-debugger ...)) (loop (send-to-emacs '(:activate-debugger ...)) (read-from-emacs))
This too was problematic, because the :initialize-debugger event could cause a RPC from Emacs to Lisp (e.g., fetching the backtrace). But the result of the RPC arrived after the :activate-event. I gave at this point.
How about making it look like:
(loop (send-to-emacs `(:debug ...)) (read-from-emacs))
i.e. just like today except with the :DEBUG message moved into the loop. This feels okay so far (after 5 minutes..)
I think we cannot blindly accept every event at any time. Maybe we need something like a mailbox with Erlang-style selective receive :-)
Do you have more bad cases in mind already? I wanna wanna wanna make this work, it could solve all our interrupt/thread/etc woes.
I've attached my currently hacked patch just for your info / trouble spotting :-)