numaproj / numaflow-python

Numaflow Python SDK
Apache License 2.0
53 stars 18 forks source link

Documentation: examples for asyncio with ThreadPoolExecutor and ProcessPoolExecutor #52

Closed ashwinidulams closed 1 year ago

ashwinidulams commented 1 year ago

It would be nice to add an example demonstrating the use of asyncio with ThreadPoolExecutor and ProcessPoolExecutor.

idea is to start an asyncio server and delegate blocking operations (that dont support asyncio) to either a ThreadPoolExecutor or a ProcessPoolExecutor.

This is a good resource - https://pymotw.com/3/asyncio/executors.html another one - https://superfastpython.com/threadpoolexecutor-vs-asyncio/