Pymacs icon indicating copy to clipboard operation
Pymacs copied to clipboard

Timers can run while Emacs is waiting for Pymacs

Open calmofthestorm opened this issue 4 years ago • 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.

calmofthestorm avatar Apr 10 '20 02:04 calmofthestorm

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?

idnael avatar Dec 24 '23 23:12 idnael