Closed yxbh closed 9 years ago
Alright, fair enough :P
Should I close the pull request then?
I don't think is a good Idea using hardware concurrency as default value for poolsize. The reason is that "Default Pool Size" can be assumed constant by someone using the library while instead its value will change depending on the device in wich code run.. Or Am I just too pessimistic?
I'm purposing a semantic/format fix to fix some inconsistency where some parts of the code would refer to the members via "this->" and others reference the member variables directly. I've changed all to "this->mem" format. Some brackets are moved to be more consistent over all. I've also added void to signatures for readability. I realise this is just personally preference and you might not like it, so it's okay to not accept this.
I've also changed push to emplace in the enqueue method. Since we are constructing a std::function with a lambda, I think emplace makes sense here.
I also think it would be appropriate to have a default constructor as below:
It would look better if we have a static local function
then we can have:
Let me know what you think.