Exemple
Observe the implicit parent greenlet control return behavior when a switched-to greenlet completes
sha256:bdf2e2f5b210f6ce304b4c4a450f53972eceeab15ddf990f5cea4c215abe7355
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- python
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- python
- Langage
- python
- Gestionnaire de paquets
- pip
Environnements des exécutions de vérification
- Contexte d'exécution
- python 3.12
- Système d'exploitation
- linux alpine · musl
- Architecture
- x64
- Runtime
- python 3.12
- Langage
- python
- Gestionnaire de paquets
- pip
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
Cas
- Objectif
- Observe the implicit parent greenlet control return behavior when a switched-to greenlet completes HOW
- Paquets
-
greenlet 3.0.3
- Environnement
- python
- Créé
- 2026-08-17T17:46:23Z
Ce que l'on suppose souvent
Control implicitly returns to the greenlet that called switch(), behaving like a symmetric coroutine yield or regular function call
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- When greenlet B switches to greenlet C, and C finishes its execution, control returns to C's parent (its creator), rather than back to B that performed the switch
- f1 starts and switches to f2 using g2.switch()
- f2 completes and control implicitly returns to main, not f1, leaving f1 suspended forever
- result contains 'main end' but never receives 'f1 end'
Fichiers
- NOTES.md
- csx.json
- requirements.txt
- test_contract.py
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9