Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Update async.md for 1.0 and Threading #656

Merged
merged 3 commits into from
Aug 4, 2022

Conversation

LilithHafner
Copy link
Contributor

@LilithHafner LilithHafner commented Aug 3, 2022

Closes #636
Closes #640

@tknopp
Copy link
Collaborator

tknopp commented Aug 3, 2022

I would actually remove the multi-process version.

@LilithHafner
Copy link
Contributor Author

LilithHafner commented Aug 3, 2022

I was inclined to keep it and list it first because when running the default julia -t1 the Distributed approach works for me and the Threads approach stalls the UI. Why do you prefer the single-process version?

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2791421964

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.6%) to 63.03%

Totals Coverage Status
Change from base Build 2758684380: -1.6%
Covered Lines: 1635
Relevant Lines: 2594

💛 - Coveralls

@coveralls
Copy link

coveralls commented Aug 3, 2022

Pull Request Test Coverage Report for Build 2791421964

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

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 70.193%

Totals Coverage Status
Change from base Build 2758684380: 0.0%
Covered Lines: 1785
Relevant Lines: 2543

💛 - Coveralls

@tknopp
Copy link
Collaborator

tknopp commented Aug 3, 2022

Because ist just works in toy examples for me. If the callback needs to call package code one needs to run Julia with -p and "@Everywhere using ...". Data exchange ist also more complicated. For me the multi-threaded version is much simpler.

If I see it right, Julia 1.8 will give us the second thread by default.

@LilithHafner
Copy link
Contributor Author

If the callback needs to call package code one needs to run Julia with -p and "@Everywhere using ...". Data exchange ist also more complicated.

Noted. Threading certainly has advantages and should probably be listed first.

If I see it right, Julia 1.8 will give us the second thread by default.

Where did you see that?

x@X ~ % julia +beta
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _' |  |
  | | |_| | | | (_| |  |  Version 1.8.0-rc3 (2022-07-13)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> Threads.nthreads()
1

In 1.9 we will have interactive threads which should make the threading approach more robust:

"Threads.@Spawn now accepts an optional first argument: :default or :interactive. An interactive task desires low latency and implicitly agrees to be short duration or to yield frequently. Interactive tasks will run on interactive threads, if any are specified when Julia is started ([#42302])." (https://github.com/JuliaLang/julia/blob/df846436bb91b291be988f5e18e256d514b97347/NEWS.md)

I think the best option is probably to recommend threads and then afterward, note that Distributed is also an option with caveats.

@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #656 (a27145e) into master (ac0ec81) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #656   +/-   ##
=======================================
  Coverage   65.60%   65.60%           
=======================================
  Files          32       32           
  Lines        2721     2721           
=======================================
  Hits         1785     1785           
  Misses        936      936           

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

@tknopp
Copy link
Collaborator

tknopp commented Aug 3, 2022

🙁 I thought this would be in 1.8.

But anyway. I like your suggestion of just switching the order.

to highlight potential issues with Distributed and to link to the relevant manual entries
@tknopp
Copy link
Collaborator

tknopp commented Aug 4, 2022

thanks!

@tknopp tknopp merged commit 766bae3 into JuliaGraphics:master Aug 4, 2022
@LilithHafner LilithHafner deleted the patch-3 branch August 4, 2022 13:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Async UI example needs updating
3 participants