#6068 [flytekit/async] Merge loop usage & do proper signal handling
Issue created by
wild-endeavor
### Describe the issue
Multiple loops and threads are used in the course of flytekit's async handling. Eager tasks themselves rely on a worker to launch executions of sub-flyte-entities against the control plane. Currently this latter loop is run outside of the main loop manager that flytekit uses. We should consider merging, and then implement proper loop lifecycle management for all loops, running on any thread. (i.e. calling
.cancel()
on all running tasks of each loop and handling canceled errors correctly in the relevant coroutines).
### What if we do not do this?
Signal handling and async loop lifecycle management remains messy.
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flyte