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 Default dispatcher instead of Main in Community scope. #79

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

Conversation

rahimklaber
Copy link

The coroutineScope in the Community class uses Dispatchers.Main. Dispatchers.Main is used to run code on the UI thread and should not be used for anything else.

Code that uses the scope without specifying the Dispatcher when launching a new task (like eva), does not work on a PC, as you need another dependency to access the Main dispatcher.

https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-main.html

@github-actions
Copy link

github-actions bot commented Apr 5, 2023

File Coverage [84.44%] 🍏
Community.kt 84.44% 🍏
Total Project Coverage 63.11% 🍏

@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.21 🎉

Comparison is base (0623f77) 58.32% compared to head (6a40fa2) 58.53%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #79      +/-   ##
============================================
+ Coverage     58.32%   58.53%   +0.21%     
- Complexity      697      702       +5     
============================================
  Files           107      107              
  Lines          4487     4546      +59     
  Branches        634      638       +4     
============================================
+ Hits           2617     2661      +44     
- Misses         1538     1550      +12     
- Partials        332      335       +3     
Impacted Files Coverage Δ
ipv8/src/main/java/nl/tudelft/ipv8/Community.kt 75.78% <ø> (+1.78%) ⬆️

... and 7 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

1 participant