-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Worker's WaitingTaskList directly in PuttableProductResolver
This change was triggered by a case where a PuttableProductResolver was filled by a Worker that produced many products, and one of the products (A) had a Ref to another product (B), and the product B was not consumed by any module (it was only accessed through the Ref). Since the putProduct() released the WaitingTaskList of the Resolver, that lead to the consumer of A to run, and that consumer dereferenced the Ref to see that B was not there. Besides scheduled modules another cases where PuttableProductResolver is used are Sources inheriting PuttableSourceBase, and TestProcessor. In these cases the products are put into the Resolvers (or left as non-produced) before launching the prefetching of the unscheduled system. Therefore in these use cases the consuming modules do not need to wait for the Resolver to be filled. After several fix attempts it seemed easiest to just use the Worker's WaitingTaskList directly in PuttableProductResolver. This approach fulfills the requirements of both Worker and Source(-like) use cases, and even simplifies the code.
- Loading branch information
Showing
3 changed files
with
20 additions
and
43 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