Skip to content

Design choice question #975

Answered by cowboyd
davidbrochart asked this question in Q&A
Feb 14, 2025 · 5 comments · 5 replies
Discussion options

You must be logged in to vote

Regarding cancellation, I guess it's really a question of default behavior. When I launch tasks I expect them to run until complete. In Trio there is nothing to do, in Effection I have to yield* all(my_tasks), which adds to cognitive load. But I guess I'm biased because I'm coming from Trio :)

I hear you. We just found that there was less cognitive load with the reverse as the default. It might be due to the use-cases we were applying to Effection, but again, we found that if the type of a task was Task<void> and it was being run purely for its persistent side-effects, then the vast majority of the time, we would want to cancel it at the end. To not would be the edge case. However, if t…

Replies: 5 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@davidbrochart
Comment options

@cowboyd
Comment options

@davidbrochart
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cowboyd
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by davidbrochart
Comment options

You must be logged in to vote
1 reply
@cowboyd
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #974 on February 14, 2025 17:00.