[issue42445] Assertion in run_coroutine_threadsafe

2020-11-24 Thread Jochen Kienzle
Jochen Kienzle added the comment: Thanks for your reply. I already tried asyncio.run(self.mqtt_client.publish_json(INGESTION_TOPIC, msg)) but this leads (rarely) to the following error: got Future

[issue42445] Assertion in run_coroutine_threadsafe

2020-11-23 Thread Jochen Kienzle
New submission from Jochen Kienzle : Hello, in my implementation I want to call mqtt_client.publish_json from a sync method: - def __on_event(self, ev): ... asyncio.run_coroutine_threadsafe(self.mqtt_client.publish_json(INGESTION_TOPIC, msg), loop