This repository was archived by the owner on Feb 13, 2025. It is now read-only.
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
wrong stackless.current in schedule callback #42
Closed

Description
Originally reported by: Anselm Kruis (Bitbucket: akruis, GitHub: akruis)
stackless.run() switches from the main tasklet to another tasklet T. If a schedule callback is invoked for this switch, the stackless.current is T. This is incorrect. Inspection of the code in slp_schedule_task_prepared() reveals, that Stackless calls the schedule callback before the switch.
I added a test case and I also have a preliminary fix.