
any particular reason why the function sig accepted is function < void ( void ) > instead of function < void ( void * ) > which you might deduce as more complete for at least these four platforms: thread function signatures ( noted in ACE ) posix = function< void * ( void * ) > win32 = function < DWORD ( void * ) > vxworks without pthreads = function < int (...) > // if such a thing were possible?? pSoS = function < void (void *) > any other examples or thoughts ? matt

On 9/13/05, Matt Hurd <matt.hurd@gmail.com> wrote:
any particular reason why the function sig accepted is function < void ( void ) > instead of function < void ( void * ) >
That's because if you need to pass any arguments to the thread function, you can use boost::bind. Which makes it more readable and type-safe. No need to have a void* parameter in the thread function.
matt
-- Felipe Magno de Almeida Developer from synergy and Computer Science student from State University of Campinas(UNICAMP). Unicamp: http://www.ic.unicamp.br Synergy: http://www.synergy.com.br "There is no dark side of the moon really. Matter of fact it's all dark."
participants (2)
-
Felipe Magno de Almeida
-
Matt Hurd