Clarifying the exception specification for bulk callback functions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- cpp
- Ambito
- backend-api-design
Direzione di ricerca
Leggi include/stdexec/__detail/__parallel_scheduler.hpp alle righe 390-419 e confronta la gestione delle callback del parallel scheduler con l'implementazione predefinita di bulk. Usa l'esempio sync_wait/bulk fornito per stabilire se std::runtime_error dovrebbe raggiungere il set_error del receiver e il catch circostante; il lavoro è concluso quando il contratto delle eccezioni per le implementazioni personalizzate di bulk è deciso e verificato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Do we really allow the bulk callback function to throw an exception? That is, when the bulk callback throws an exception, will that exception be propagated through the receiver's set_error(std::exception_ptr)?
Consider:
Given a scheduler sch, what should be the behavior of the following code?
try {
stdexec::sync_wait(stdexec::schedule(sch) | stdexec::bulk(std::execution::par, 1uz, [](std::size_t){
throw std::runtime_error{"xxx"};
}));
}
catch (const std::runtime_error& e) {
...
}
Can the try-catch here catch this std::runtime_error?
For the default implementation of bulk, the answer is yes, it can be caught. But for some customized bulk implementations, it may be different. For example, if sch here is a stdexec::parallel_scheduler, the program will terminate, see https://github.com/NVIDIA/stdexec/blob/e8c349f3f3425b9341306bc56615fc5279a15cf4/include/stdexec/__detail/__parallel_scheduler.hpp#L390-L419
which does not handle the case where the call to __state->__fun_ throws an exception. However, fixing this seems a bit tricky, or should we reconsider the exception specification of bulk_item_receiver_proxy::execute?
- Lingua principale
- C++
- Stelle
- 2.4k
- Fork
- 270
- Merge medio
- 2g 16h
- PR unite (30g)
- 43
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/stdexec
-
inline_scheduler's namespace-scope static_assert fails under nvcc (private nested __sender access) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 65/100
Tutte le issue di NVIDIA/stdexec
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
brave/brave-browser#59300 ·
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main Apertaai_reviewed
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
ydb-platform/ydb#53974 · 3 commenti ·