Boost logo

Boost Users :

Subject: [Boost-users] [asio] Correct handler signature for io_service::post/dispatch
From: Gary Sanders (lex21_at_[hidden])
Date: 2012-05-20 06:23:52


Currently I'm developing a server that uses Boost.Asio, version 1.49. It
makes use of io_service::post and io_service::dispatch to invoke
handlers running in the same process, but on different threads. Some of
the handlers invoke a function with the following signature:

   void handler(std::string s);

This works fine and no problems have been observed. However,
subsequently I read in the asio documentation that the function
signature of a handler invoked by post/dispatch *must* be in the
following format:

   void handler();

Is my code working by chance or is the asio version 1.49 documentation
out of date?

Regards

Gary Sanders


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net