You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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??
The text was updated successfully, but these errors were encountered:
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??
The text was updated successfully, but these errors were encountered: