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
Currently when a Manager thread spawns a submanager, there is a thread which runs along the list of submanagers, and cleans out the finished ones (this list is maintained, so in the event of an exception we can clean up the threads).
Currently the list of threads is made threadsafe by being kept inside a TVar (i.e. it uses software transaction memory). It also retry's on unbounded many submanagers, which is bad. This wasn't considered an issue, since there shouldn't be too much submanager churn.
A better approach would be, as in warp's timeout thread, use a list protected by an IORef, swap it out for an empty list (to which new submanagers can be added), trim the finished submanagers, and then merge them back in to the IORef'd list.
It would also be a good opportunity to improve the unit testing of the Manager submodule.
The text was updated successfully, but these errors were encountered:
Currently when a Manager thread spawns a submanager, there is a thread which runs along the list of submanagers, and cleans out the finished ones (this list is maintained, so in the event of an exception we can clean up the threads).
Currently the list of threads is made threadsafe by being kept inside a TVar (i.e. it uses software transaction memory). It also retry's on unbounded many submanagers, which is bad. This wasn't considered an issue, since there shouldn't be too much submanager churn.
A better approach would be, as in warp's timeout thread, use a list protected by an IORef, swap it out for an empty list (to which new submanagers can be added), trim the finished submanagers, and then merge them back in to the IORef'd list.
It would also be a good opportunity to improve the unit testing of the Manager submodule.
The text was updated successfully, but these errors were encountered: