Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

Conversation

@annatisch
Copy link
Member

This is a breaking change to the Azure SDK for Event Hubs.

xinchen10 and others added 30 commits May 29, 2018 13:50
I have removed all usage of threads thoroughout the code.
Using threads to run pumps etc. Causes async code written into the event-processor
to become caotic (you need to follow which loop is currently being used in the call to
prevent loops not being found or using the wrong loop (There is the main loop and then
loops that are created inside threads) Things become caotic when the event processor is
being called by objects that run under different loops.

So, no Threading except usage of asyncio run_in_executor. This is done mostly for azure blob api calls.

Also changed the bla_async methods to not block. this way, when calling open_async for the the
event-processor-host, the command will exit once the EPH is started.

Due to the above, see the edited example/eph.py where I added a monitor that makes sure the EPH is still running
(Could be replaced by loop.run_forever()) in the example file I have also incorporated a test class for gracefully
killing the EPH after 30 seconds. this works, nevertheless takes a while to close as we are waiting for timeouts
on the eventhubs connections.
@annatisch annatisch merged commit 8cb85ef into master Jun 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants