I would like to test my class which implements shared data.
because of it I have written test code which use boost::thread & boost
asio (please see below).
the problem is that threads are NOT started... on multicore machine.
one one core machine it runs fine.
any idea why?
tom
#include <iostream>
#include <istream>
#include <ostream>
#include <string>
#include
#include
#include
#include
#include "shared.hpp"
#include
#include
#include
SharedData replyToClients;
void handle_timeout1(const boost::system::error_code&)
{
boost::minstd_rand generator(42u);
boost::uniform_real<> uni_dist(0,1);
boost::variate_generator
uni(generator, uni_dist);
std::string key = "ello";std::cout<= cond){
replyToClients.set(key,value1);
}else{
replyToClients.set(key,value2);
}
}
}
void handle_timeout2(const boost::system::error_code&)
{
std::string key = "ello";
while(true){
std::cout<http://klik.wp.pl/?adr=http%3A%2F%2Fwhosegame.pl%2Fcontestcard.php%3Fcontest%3D55&sid=631