Closed Jessie-1 closed 1 year ago
The library is intended for a sync environment, but if you aim to subscribe to multiple storage keys at once you can have a look at the subscribe_storage()
function, see docs:
Otherwise you can resort to work with threads, be sure to use a separate instance of SubstrateInterface
per thread because otherwise it wouldn't be threadsafe. See examples mentioned in:
https://github.com/polkascan/py-substrate-interface/issues/206#issue-1188620072
https://github.com/polkascan/py-substrate-interface/issues/82#issuecomment-810957617
unable to subscribe more due to blocking.