I am using a bunch of worker threads as watchdogs and I want to ensure that the main thread gets the highest priority when requesting for the shared resource ,(database in my case) i.e. the worker threads should not block the main thread's request. Priority queue is something in my mind, any other good solution please ?
Aucun commentaire:
Enregistrer un commentaire