-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Yielding to a copied task crashes #4080
Comments
No, tasks are not currently meant to be copied. I think it could be implemented, but the semantics are a bit fiddly. For example, a task waiting for the original task is probably not waiting for the copy. And values referenced from the task's stack should probably not be deep-copied. Stefan and I kind of disapprove of deep copying in general, but we were not quite able to talk people out of adding it. |
These issues are troublesome. In the contexts in which I'm used to being able to copy coroutines, the coroutines are rigidly asymmetric, so the solutions that are enabled by that assumption may not be applicable. I'll look into it a bit more if I have time.
|
Looks like this should be linked to #4085. |
Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: 9f8e11a4c New commit: 7b759d7f0 Julia version: 1.12.0-DEV Pkg version: 1.12.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@9f8e11a...7b759d7 ``` $ git log --oneline 9f8e11a4c..7b759d7f0 7b759d7f0 Automatically upgrade empty manifest files to v2 format (#4091) 69c6de019 Remove duplicated word "different" (#4088) 87a4a9172 Actually switch to "Resolving Deltas" (#4080) ef844e32f Update CHANGELOG.md: link to [sources] PR (#4084) e10883ce5 REPLExt: check for compliant repl mode during repl init (#4067) ``` Co-authored-by: Dilum Aluthge <[email protected]>
I don't know what the right behavior is here. If tasks are not meant to be copied, copying one could return the original or throw an exception.
There are significant use cases for copying tasks, though, so I hope that they are meant to be copied. In that case, the bug is that copied ones do not work.
The text was updated successfully, but these errors were encountered: