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
Exception handling in Julia is done using try — catch — finally, instead of try — except — finally. In contrast to Python, it is not recommended to use exception handling as part of the normal workflow in Julia (compared with Python, Julia is faster at ordinary control flow but slower at exception-catching).
Therefore, while it makes sense for SimPy to handle interruptions with try - except logic, doing so in ConcurrentSim hurts performance, and may not be the ideal solution.
The text was updated successfully, but these errors were encountered:
Indeed, let's mark this up as a feature and documentation request. There is an alternative to some of the try-catch uses (e.g. by relying on isready or waiting on events), but we can keep this issue open until all examples in the documentation use a non-exception control flow and that the performance issues of try-catch are also well documented in appropriate warning blocks.
From the official Julia documentation, in the section on noteworthy differences between Julia and Python:
Therefore, while it makes sense for SimPy to handle interruptions with try - except logic, doing so in ConcurrentSim hurts performance, and may not be the ideal solution.
The text was updated successfully, but these errors were encountered: