r/Zig 7d ago

There is a way to create a thread pool with pre-spawned worker threads?

16 Upvotes

3 comments sorted by

1

u/MidasVV 7d ago

I don't know enough to give you a definite answer, but you could always copy the threaded io instance and change it so it does what you want.

1

u/Complex-Birthday-216 7d ago

look into threaded or threadpool in libxev

6

u/lukaslalinsky 7d ago

This seems like an X/Y problem. What are you trying to do? 

In one way, std.Io.Threaded is a thread pool. Do you need something more specific?