Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

"Tail recursion" in callbacks #15

@GoogleCodeExporter

Description

@GoogleCodeExporter
When some code that is itself a callback (e.g. a fd handler) wants to call some 
other code (maybe a protocol method) immediately before returning, I used to 
use call_soon() to delay the other call.  I think this just causes more work 
going through the event loop.  I think it's safe to make such calls directly, 
provided that

1. It is the last call before returning

2. There is no try/execpt or try/finally surrounding it

Original issue reported on code.google.com by gvanrossum@gmail.com on 20 Mar 2013 at 8:32

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions