8000 Callback chaining clarification · Issue #86 · crossbario/txaio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Callback chaining clarification #86
Open
@olafmandel

Description

@olafmandel

The documentation states:

Note that txaio doesn’t do anything special with regards to callback or errback chaining – it is highly recommended that you always return the incoming argument unmodified in your callback/errback so that Twisted and asyncio behave the same.

But even for asyncio there is a slightly hacky call-chaining implemented in txaio/aio.py. And this seems to be used extensively, e.g. in autobahn/wamp/protocol.py.

Please either update the documentation, rendering this functionality "official and supported" or remove the hack from aio.py (which I expect to cause quite some test failures in dependent libraries). If the decision is to remove the hack, please consider providing a replacement for this idiom used in crossbario/autobahn-python:

d = txaio.as_future(func1)
txaio.add_callbacks(d, txaio.as_future(func2), None)
txaio.add_callbacks(d, txaio.as_future(func3), None)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0