Reputation: 1334
I am using boost::asio::io_service and boost::asio::deadline_timer from a secondary (i.e. non-GUI) worker thread. This works perfectly when the program is run from within Visual Studio (2010). However, when I run the release executable outside of Visual Studio, the async_wait()/run() combination doesn't seem to do anything.
I have confirmed that run() does indeed block. I have also now confirmed that the debug executable works fine, it is only the release executable that does not work (i.e. the function specified in async_wait() is not run).
Perhaps there is some project setting, some optimization I need to disable, or something?
Upvotes: 0
Views: 261
Reputation: 62975
(Reposting from comment so the question can be marked as answered)
You probably have an uninitialized variable somewhere, i.e. a default-initialized object of scalar or POD type.
Upvotes: 3