-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Figure write-to-disk is called as an async task, so it doesn't block the main computation thread.
That significantly speeds up execution for scenarios where you have other computation to proceed with (e.g. a flow solver where you're printing out monitor charts each timestep, but don't want to pause execution of the main solution to serialise all that json to figures).
However, figure writing is still done within the main background thread, so the program execution can never be quicker than the length of time required to write the figures. In most cases this is fine, but if you want the main program to execute then return quicker than the figure writes, that could be a problem.
Consider creating daemonised threads for writing figures so the task is (optionally) offloaded and may or may not be completed after program execution ends.
Votes and +1s, anyone??