thread-safe concurrent task compilation system
https://gist.github.com/mgood7123/878b7c2988372838c51d11ee4fad84c3
how can i correctly set up locking and cancellation points for this?
the basic idea is that we call
an attempt to
an attempt to
upon a
this callback should also handle cancellation if an
how can i correctly address all of the above ?
how can i correctly set up locking and cancellation points for this?
the basic idea is that we call
reload for each file to be compiled/recompiled, and we call invoke_callback which will invoke methods for any successfully compiled filereload is called via FileSystemWatcherinvoke_method is called from user code (eg, our app)reload launches a separate compilation task to avoid stalling the file watcher while compiling filesan attempt to
reload during an active compilation should cancel the current compilation and start a new compilationan attempt to
unload during an active compilation should cancel the current compilationupon a
successful compilation, we execute a callback which is called in the compilation thread, outside of the file watcher threadthis callback should also handle cancellation if an
unload or reload is triggered and we (the callback) have not yet finishedinvoke_callback will invoke the specified callback for all succesfully compiled scripts, and should not handle unload and reload events as we expect the methods being called to correctly handle the cancellation event of the passed cancellation tokenhow can i correctly address all of the above ?
