Skip to content

Recommended approach for adding custom tasks & events that work with ib_async #36

Answered by mattsta
blair-anson asked this question in Q&A
Discussion options

You must be logged in to vote

A correct, but probably not as useful as you want, answer is "learn how everything works together" by trying different approaches until you see a dozen different ways how everything can break and the three ways everything works.

For the most flexibility and performance, the library should be used in an async-native fashion with all the *Async() methods you manually call using await ib.connectAsync() etc (or it can use async "behind the scenes" transparently with just ib.connect() but then the library starts and owns the event loop itself and it's more difficult to fully interoperate other async services with).

The general pattern with python asyncio is you use asyncio.run() to start the e…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@blair-anson
Comment options

Answer selected by blair-anson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants