Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ProcessPoolExecutor instead of ContextVarExecutor/ThreadPoolExecutor #34

Open
varshith15 opened this issue Feb 19, 2025 · 0 comments

Comments

@varshith15
Copy link

Your question

hi @doctorpangloss, I just needed some clarity regarding using a ProcessPoolExecutor instead of ContextVarExecutor here

self._executor = executor or ContextVarExecutor(max_workers=max_workers)

for more context, im using EmbeddedComfyClient to run a couple of prompts in parallel and the workflows are CPU intensive and so using threads is restricting the perf.

I see that there is an internal implementation on ProcessPoolExecutor here, but it doesn't work when i swap it out

class ProcessPoolExecutor(ProcessPool, Executor):

Also tried using the ProcessPoolExecutor of concurrent.futures instead but the same result.

I think this could be a useful feature to add, i'd be happy to contribute if you provide me some clarity.

Thanks!

Logs

Other

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant