-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
txgen-mvar: rework AsyncBenchmarkControl
I. make AsyncBenchmarkControl a record The type alias of a tuple was not very mnemonic or self-explanatory. This replaces it with a record and haddock documents its fields. II. use ABC to cancel threads The AsyncBenchmarkControl that should be initialized by the time a signal is received is fetched from the TVar and unpacked to be used to throw exceptions to the other threads. The other threads can now catch the exceptions in order to carry out orderly shutdowns in the sequel. III. use TVar for Env AsyncBenchmarkControl In order to thread the AsyncBenchmarkControl through the contexts surrounding the creation and destruction of the Async structures and overall container, this stores a TVar (Maybe AsyncBenchmarkControl) as a value in a Map where previously it was just AsyncBenchmarkControl. The idea is to use the reference to it to be able to use it in the context of a signal handler by packaging the reference data with the code pointer in a partial application or monadic context or similar. With that data in hand, it's just a matter of iterating over the threads and reaping them all.
- Loading branch information
1 parent
c83eed1
commit 3c89de4
Showing
8 changed files
with
68 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters