Ma Lin <malin...@163.com> added the comment:
These can be done in .__new__() method: - create thread lock - create (de)?compression context - initialize (de)?compressor states In .__init__() method, only set (de)?compression parameters. And prevent .__init__() method from being called multiple times. This mode works fine in my pyzstd module (A Python bindings to zstd library). But I think very few people will encounter this problem, we can leave it. ---------- nosy: +malin _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue23224> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com