cylc-uiserver
cylc-uiserver copied to clipboard
data store: remove threading
Closes #194
Run subscribers via asyncio rather than the ThreadPoolExecutor.
I think the only non-blocking operations in the code being called were:
- time.sleep (has an async variant)
- asyncio.sleep (async)
- self.socket.recv_multipart (async)
If so, I don't think we need to use threading here so I've refactored the code so that the underlying async functions could be called via asyncio.
If so, this cuts out the need for the ThreadPoolExecutor
removing the workflow limit.
Check List
- [x] I have read
CONTRIBUTING.md
and added my name as a Code Contributor. - [x] Contains logically grouped changes (else tidy your branch by rebase).
- [x] Does not contain off-topic changes (use other PRs for other changes).
- [x] Applied any dependency changes to both
setup.cfg
(andconda-environment.yml
if present). - [x] Tests are included (or explain why tests are not needed).
- [x]
CHANGES.md
entry included if this is a change that can affect users - [x] Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
- [x] If this is a bug fix, PR should be raised against the relevant
?.?.x
branch.