Pymacs
Pymacs copied to clipboard
Timers can run while Emacs is waiting for Pymacs
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.
Hi. I'm also having a problem with emacs timers calling python code. Can't find those examples you mentioned. Can you provide more information?