On 29-Oct-15 4:09 PM, Vicente J. Botet Escriba wrote:
I'm worried that Executor interface requires methods like
close/closed, This is used to shutdown smoothly the worker threads.
So where will ::close be called? Is it ever called from boost::thread? That seems unlikely, since boost::thread does not know at which point I no longer need an executor. And if boost::thread does not call this, why am I required to implement this method at all? Some executors call close in the destructor before joining all the threads. In addition the use can request to close the submission of new work.
If needed we can move this also to another Executor layer, so that Executors can be created without close()/closed().
Yes, that would make sense. I found it a tad confusing that a concept requires some methods that I'd have to call myself. Usually, a concept requires only the method that the library will actually call. You are right. I'll check where these are close/closed()/try_executing_one/ are needed for the concept and the
Le 29/10/15 14:34, Vladimir Prus a écrit : polymorphic interface. Vicente