Exceptions raised in `Spawn`ed cothread can be lost
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- operating-systems
Research direction
Start at the Spawn and Wait entry points described in the issue and reproduce the provided task example without calling Wait(). Trace how the exception is stored and reported, including the suggested del path; done means an exception from a completed spawned cothread is reported even when Wait() is never called.
Written by the indexing model from the issue text.
Description
The Spawn option raise_on_wait causes reporting of any exception terminating the spawned cothread to be deferred until .Wait() is called on the associated cothread, for instance:
def task(): raise Exception('Die')
def test():
action = Spawn(task, raise_on_wait = True)
action.Wait()
Unfortunately if .Wait() is never called then the associated exception is never reported.
It might be possible to fix this by added a __del__ method to Spawn and reporting any exception that hasn't already been reported.
- Dominant language
- C
- Stars
- 13
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DiamondLightSource/cothread
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
DiamondLightSource/cothread#78 · 2 comments ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
DiamondLightSource/cothread#75 · 5 comments ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
DiamondLightSource/cothread#73 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
DiamondLightSource/cothread#68 · 3 comments · 1 reaction ·
All issues in DiamondLightSource/cothread
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ExpressLRS/ExpressLRS#3806 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100