I am having a full software stack with at least 3 layers of code. Upper layer consumes API of lower layer, and so on. The code is all in C++, si no bindings or language translation is required.
At the moment, each layer can create their own threads on demand, with no restrictions. I thought of refactoring the code so I just have one Runtime at the top layer, and from there I pass down a TreahPool, so each layer or module in the laayers below that needs to use a thread will take it from the pool.
Would you know any open source project where this is the case? Where there is a centralize ThreadPool from which all required threads are taken? I might be missing some drawbacks on that solution and it would be good to see it implemented somewhere.
Aucun commentaire:
Enregistrer un commentaire