pinard/Pymacs

Timers can run while Emacs is waiting for Pymacs

calmofthestorm opened this issue · 1 comments

I finally figured out a problem I've been having where Pymacs becomes unreliable in the presence of timers that call into it. This seems to occur because Emacs can run timers when waiting for the Pymacs process to respond, which leads to race conditions in the Pymacs buffer.

To work around this, don't call Pymacs from inside timers, or ensure that this will never happen while Emacs is waiting for a response from Pymacs. If your timer does not have strict timing requires but rather should run "occasionally", consider scheduling a new run and trying again later. See the docs on idle timers for an example.