A way to dispose of unnecessary Simulator
subscriptions
#516
Labels
enhancement
New feature or request
Simulator
subscriptions
#516
Motivation
When running many tests, it may be necessary to build many versions of the same or different
Module
s, each with a variety of their ownLogic
s. The_Wire
s withinLogic
s have automation to re-subscribe toSimulator
events after aSimulator.reset
so that they still functionally work (e.g. for reusing same hardware between tests/simulator resets). However, if you are "throwing away" the old reference to some DUT, and you don't want to simulate with it anymore, you don't care that theLogic
s within are properly simulating and triggering events likechanged
. In this case, each time you throw away hardware, you're paying a penalty for future simulations onSimulator
events.One of the most problematic issues is that
Simulator.resetRequested
is re-subscribed every time. Then, if you have atearDown
whereSimulator.reset()
is called, the call will get progressively slower as it has to restart more and more subscriptions each test.This only really impacts test files with many
Simulator.reset
calls (many tests, many DUTs, etc.).Desired solution
Some mechanism to signal that
Simulator
subscriptions should be disposed of, rather than just restarted. A way to clean up all the old hardware between tests.Alternatives considered
Simulator
can send out indicating things should be disposed of permanentlyAdditional details
No response
The text was updated successfully, but these errors were encountered: