unsealed counsel

Posts tagged "lisp":

Anonymous state variables in emacs lisp

05 Jun 2022

Asynchronous programming typically involves the use of context-local state variables, e.g., threads can use thread-local storage. In my consult-dash emacs package, results from multiple searches were collected into a single state variable for further processing. The state variable would have been created on the heap in languages such as C, and a reference passed along to any asynchronous calls, typically via a void pointer in C. Each invocation of the asynchronous procedure would create a new anonymous state, which should then be destroyed by the consumer of the result of the asynchronous procedure.

Tags: emacs, lisp
Other posts
Creative Commons License
runes.lexarcana.com by Ravi R Kiran is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License .