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

Fixed deadlock when executing fetch request #1254

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yevgeniy-logachev
Copy link

Fixed deadlock when executing fetch request from main and background threads simultaneously. As Apple docs say about using performBlockAndWait:
"The one exception is: if your code is executing on the main thread, you can invoke methods on the main queue style contexts directly instead of using the block based API."

@yevgeniy-logachev
Copy link
Author

Strange that CI finished building with failure status. These changes cannot affect on compilation result

@ssuhanov

This comment has been minimized.

}
else
{
[context performBlockAndWait:^{
Copy link

Choose a reason for hiding this comment

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

[context performBlockAndWait:block];

@Coeur Coeur self-assigned this Jun 21, 2019
@Coeur
Copy link
Collaborator

Coeur commented Jun 22, 2019

@yevgeniy-logachev how to reproduce the deadlock ? can you demonstrate it with a piece of code?

@Coeur Coeur removed their assignment Oct 28, 2019
@Coeur
Copy link
Collaborator

Coeur commented Oct 28, 2019

@yevgeniy-logachev could you at least rebase your branch to the current tip to see if the Travis builds can pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants