Skip to main content

Timeline for Thread pool using boost::thread

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
Mar 17, 2016 at 6:29 vote accept duong_dajgja
Mar 17, 2016 at 6:29 comment added duong_dajgja After thinking a lot of virtual JobItem::execute() I decided to go on the way you pointed out. Thank you very much!
Mar 12, 2016 at 12:48 comment added Loki Astari I am saying that JobItem is a better place to put your virtual function. The job should know how to execute itself. This is the open/closed principle. Now when you have to add new functionality you have to have a different worker type which means re-compiling the application. By makeing the JobItem have the virtual function a new lib can add a different work type without having to re-build the worker type.
Mar 12, 2016 at 5:12 comment added duong_dajgja Actually, in this design, JobItem is just a data piece. Based on job type, exec_job will properly manipulate on the data. Also, due to license, I am using VC++ 2008, so there is no way for me to target to C++11 or later. I think boost libraries might help.
Mar 11, 2016 at 20:46 history edited Loki Astari CC BY-SA 3.0
added 99 characters in body
Mar 11, 2016 at 18:31 history answered Loki Astari CC BY-SA 3.0