Updates from BitShares FC #22

Closed
nathanielhourt wants to merge 693 commits from dapp-support into latest-fc
2 changed files with 5 additions and 9 deletions
Showing only changes of commit 21724face7 - Show all commits

View file

@ -19,7 +19,6 @@ namespace asio {
* @brief internal implementation types/methods for fc::asio
*/
namespace detail {
using namespace fc;
class read_write_handler
{
@ -59,14 +58,14 @@ namespace asio {
bool operator()( C& c, bool s ) { c.non_blocking(s); return true; }
};
#if WIN32 // windows stream handles do not support non blocking!
#if WIN32 // windows stream handles do not support non blocking!
template<>
struct non_blocking<boost::asio::windows::stream_handle> {
typedef boost::asio::windows::stream_handle C;
bool operator()( C& ) { return false; }
bool operator()( C&, bool ) { return false; }
};
#endif
#endif
} // end of namespace detail
/***

View file

@ -58,7 +58,6 @@ namespace fc {
}
else
{
//elog( "${message} ", ("message", boost::system::system_error(ec).what()));
p->set_exception( fc::exception_ptr( new fc::exception(
FC_LOG_MESSAGE( error, "${message} ", ("message", boost::system::system_error(ec).what())) ) ) );
}
@ -83,8 +82,6 @@ namespace fc {
}
p->set_value( eps );
} else {
//elog( "%s", boost::system::system_error(ec).what() );
//p->set_exception( fc::copy_exception( boost::system::system_error(ec) ) );
p->set_exception(
fc::exception_ptr( new fc::exception(
FC_LOG_MESSAGE( error, "process exited with: ${message} ",
@ -125,9 +122,9 @@ namespace fc {
for( uint16_t i = 0; i < this->num_io_threads; ++i )
{
asio_threads.push_back( new boost::thread( [=]()
asio_threads.push_back( new boost::thread( [i,this]()
{
fc::thread::current().set_name("asio");
fc::thread::current().set_name( "fc::asio worker #" + fc::to_string(i) );
BOOST_SCOPE_EXIT(void)
{
@ -194,7 +191,7 @@ namespace fc {
promise<std::vector<boost::asio::ip::tcp::endpoint> >::ptr p( new promise<std::vector<boost::asio::ip::tcp::endpoint> >("tcp::resolve completion") );
res.async_resolve( boost::asio::ip::tcp::resolver::query(hostname,port),
boost::bind( detail::resolve_handler<boost::asio::ip::tcp::endpoint,resolver_iterator>, p, _1, _2 ) );
return p->wait();;
return p->wait();
}
FC_RETHROW_EXCEPTIONS(warn, "")
}