$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] running a server "in background mode" ??
From: Igor R (boost.lists_at_[hidden])
Date: 2009-11-10 07:29:57
> Â Â Â boost::asio::io_service io_service;
> Â Â Â tcp_server server(io_service);
> Â Â Â io_service.run();
io_service::run() does not return until there's no work for io_service.
But you can run io_service in another thread:
new boost::thread(&asio::io_service::run, &io_service); // note that
io_service object can't be local here, as it must outlive the thread!