numaproj / numaflow-python

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

docs: examples for asyncio with ThreadPoolExecutor and ProcessPoolExecutor #60

Closed kohlisid closed 1 year ago

kohlisid commented 1 year ago

Closes https://github.com/numaproj/numaflow-python/issues/52

Adds examples for using ThreadPool executor and ProcessPool executor with asyncio. Additionally has an example for just writing an async handler as well.

When executing operations that dont support asyncio and can be blocking in nature such as network requests or any CPU heavy computations, its good to delegate them to ThreadPoolExecutor or a ProcessPoolExecutor.

vigith commented 1 year ago

moved to #61 for final merge