Switch to module-based singleton for ParslSerializer #2467
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes some problems where the class based serializer object was sometimes serialized and sent over the network; there is no reasonable behaviour for deserializing a singleton, but in the previous implementation, the caches used for serialization were overwritten.
The ParslSerializer class is removed entirely and the parsl.serialize.facade is the singleton instead. This is a more pythonic way of representing singletons.
Use
git show -w
on this commit to see that most of the usual diff is only whitespace indentation changes.To identify places where a ParslSerializer object was deserialized, I added a
__setstate__
method which is called whenever a ParslSerializer is deserialized.This fired when using monitoring, as monitoring carries round with it quite a lot of serialization overhead.
Type of change