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

🚑 Remove sync methods blocking main thread on Unity #26

Merged
merged 4 commits into from
Mar 2, 2023

Conversation

GabrielePicco
Copy link
Contributor

@GabrielePicco GabrielePicco commented Feb 23, 2023

Status Type ⚠️ Core Change Issue
Ready Hotfix Yes -

Problem

Many synch version of async methods are blocking the main thread on Unity.

See https://stackoverflow.com/questions/14526377/why-does-this-async-action-hang-when-i-try-and-access-the-result-property-of-my for more details on the issue.

Solution

Since sync over async is not generally a good design pattern, removed the sync version of the methods

@coveralls
Copy link

coveralls commented Feb 23, 2023

Pull Request Test Coverage Report for Build 4248196115

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 4 (50.0%) changed or added relevant lines in 2 files are covered.
  • 144 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-2.1%) to 73.193%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Solana.Unity.Extensions/TokenWallet.cs 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
src/Solana.Unity.Rpc/Builders/MessageBuilder.cs 1 93.1%
src/Solana.Unity.Extensions/Models/TokenMint/TokenDef.cs 7 74.55%
src/Solana.Unity.Extensions/Models/TokenWallet/TokenWalletAccount.cs 8 0.0%
src/Solana.Unity.Extensions/Models/TokenWallet/TokenWalletBalance.cs 8 0.0%
src/Solana.Unity.Extensions/Models/TokenWallet/TokenWalletFilterList.cs 13 0.0%
src/Solana.Unity.Rpc/Core/Http/JsonRpcClient.cs 19 62.64%
src/Solana.Unity.Extensions/TokenWallet.cs 88 0.0%
Totals Coverage Status
Change from base Build 4225337871: -2.1%
Covered Lines: 4717
Relevant Lines: 6141

💛 - Coveralls

@GabrielePicco GabrielePicco merged commit 282ac86 into master Mar 2, 2023
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.

2 participants