Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a thread in PersistenceManager for reading persisted files instead of using threads in client code #4628

Merged
merged 6 commits into from Nov 2, 2020

Conversation

chimp1984
Copy link
Contributor

@chimp1984 chimp1984 commented Oct 12, 2020

Bases on 1.4.0 release branch but intended to get into master after release. Set it as draft to make more clear its not ready for merge yet (though ready for review). Code changes are at commit fa2163f.

Use a thread in PersistenceManager for reading persisted files instead of using threads in client code

Before we use a thread in readFromResources and readAllPersisted. To avoid that client code need to deal with
threading we moved that to the PersistenceManager and changed the API accordingly so it will not return the persisted object but calls a consumer once it is completed with reading.

@chimp1984 chimp1984 changed the title Improve read file handling Use a thread in PersistenceManager for reading persisted files instead of using thread in client code Oct 12, 2020
@chimp1984 chimp1984 changed the title Use a thread in PersistenceManager for reading persisted files instead of using thread in client code Use a thread in PersistenceManager for reading persisted files instead of using threads in client code Oct 12, 2020
…d of using thread in client code

Before we use a thread in readFromResources and readAllPersisted. To avoid that client code need to deal with
threading we moved that to the PersistenceManager and changed the API accordingly so it will not return the persisted object but calls a consumer once it is completed with reading.
Add synchronous methods for tests. They new async methods lead to failing tests.
It could be probably fixed, but its quite an effort... Don't like to add code just for
tests but on the other hand, maybe those methods might be useful for other use cases as well.
@chimp1984 chimp1984 marked this pull request as ready for review October 21, 2020 19:59
Copy link
Member

@ManfredKarrer ManfredKarrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@sqrrm sqrrm merged commit f03be6a into bisq-network:master Nov 2, 2020
@chimp1984 chimp1984 deleted the improve-read-file-handling branch November 2, 2020 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants