This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients asvetlov, ned.deily, vstinner, yselivanov
Date 2018-05-28.20:59:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527541187.75.0.682650639539.issue33674@psf.upfronthosting.co.za>
In-reply-to
Content
Yury Selivanov told me that usually it's safer to add call_soon(), than to remove call_soon(). But adding many call_soon() can make asyncio SSL slower.

SSLProtocol doesn't seem to like call_soon(), it's only used at:

* connection_lost(): call_soon(self._app_protocol.connection_lost, exc)
* connection_made() ~~> call_soon(self._process_write_backlog)
* _on_handshake_complete(): call_soon(self._process_write_backlog)

That's all. All other operations are done immediately.

_on_handshake_complete() contains a long comment:

        # In case transport.write() was already called. Don't call
        # immediately _process_write_backlog(), but schedule it:
        # _on_handshake_complete() can be called indirectly from
        # _process_write_backlog(), and _process_write_backlog() is not
        # reentrant.
        self._loop.call_soon(self._process_write_backlog)
History
Date User Action Args
2018-05-28 20:59:47vstinnersetrecipients: + vstinner, ned.deily, asvetlov, yselivanov
2018-05-28 20:59:47vstinnersetmessageid: <1527541187.75.0.682650639539.issue33674@psf.upfronthosting.co.za>
2018-05-28 20:59:47vstinnerlinkissue33674 messages
2018-05-28 20:59:47vstinnercreate