I have a situation in a mode I'm writing that saves a portion of the output of a long-running asynchronous process to a variable at intermittent intervals. I need to access this data periodically. My question is are variable assignments in elisp atomic (meaning I would always get a complete value, even if it was potentially slightly out of date) or would this be a race condition?
-
2The problem is most likely not the variable assignment. Emacs does stuff like threads and sentinels only when it is waiting for input. It does not have real parallel threads (AFAIK). Most often the real problem is the interprocess communication. The asynchronous process sends data in little junks and the full data package must be reconstructed on receiver side. This can be caused by buffering of the data on the sender side - i.e., on the side of the asynchronous process.Tobias– Tobias2019-10-07 08:56:15 +00:00Commented Oct 7, 2019 at 8:56
Add a comment
|