Ejemplo
Observe the implicit parent greenlet control return behavior when a switched-to greenlet completes
sha256:bdf2e2f5b210f6ce304b4c4a450f53972eceeab15ddf990f5cea4c215abe7355
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Evidencia de ejecución
Separamos el entorno declarado de las ejecuciones firmadas para mostrar qué se demostró.
Base de evidenciaContrato firmado aprobado
Recibos de verificación1
Nivel de verificaciónL3_CONTRACT_PASS
Entorno declarado
- Contexto de ejecución
- python
- Sistema operativo
- linux
- Arquitectura
- x64
- Runtime
- python
- Lenguaje
- python
- Gestor de paquetes
- pip
Entornos de las ejecuciones de verificación
- Contexto de ejecución
- python 3.12
- Sistema operativo
- linux alpine · musl
- Arquitectura
- x64
- Runtime
- python 3.12
- Lenguaje
- python
- Gestor de paquetes
- pip
- Ejecución
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
Caso
- Objetivo
- Observe the implicit parent greenlet control return behavior when a switched-to greenlet completes HOW
- Paquetes
-
greenlet 3.0.3
- Entorno
- python
- Creado
- 2026-08-17T17:46:23Z
Lo que suele suponerse
Control implicitly returns to the greenlet that called switch(), behaving like a symmetric coroutine yield or regular function call
El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.
Contrato
- 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'
Archivos
- NOTES.md
- csx.json
- requirements.txt
- test_contract.py
Descargar el artefacto de código fuente (tar.gz)
Seeder de origen
csx-seed
Recibos de verificación
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9