removed ready func

This commit is contained in:
NikVolf 2016-04-12 07:17:57 +03:00
parent 0c42126b8f
commit 5609b555d2
2 changed files with 0 additions and 7 deletions

View File

@ -412,21 +412,18 @@ fn implement_client_method_body(
vec![] vec![]
}; };
let wait_result_stmt = quote_stmt!(cx, while !socket.ready().load(::std::sync::atomic::Ordering::Relaxed) { });
if let Some(ref return_ty) = dispatch.return_type_ty { if let Some(ref return_ty) = dispatch.return_type_ty {
let return_expr = quote_expr!(cx, let return_expr = quote_expr!(cx,
::bincode::serde::deserialize_from::<_, $return_ty>(&mut socket, ::bincode::SizeLimit::Infinite).unwrap() ::bincode::serde::deserialize_from::<_, $return_ty>(&mut socket, ::bincode::SizeLimit::Infinite).unwrap()
); );
quote_expr!(cx, { quote_expr!(cx, {
$request $request
$wait_result_stmt
$return_expr $return_expr
}) })
} }
else { else {
quote_expr!(cx, { quote_expr!(cx, {
$request $request
$wait_result_stmt
}) })
} }
} }

View File

@ -79,11 +79,7 @@ pub fn invoke<W>(method_num: u16, params: &Option<Vec<u8>>, w: &mut W) where W:
/// IpcSocket /// IpcSocket
pub trait IpcSocket: Read + Write + Sync { pub trait IpcSocket: Read + Write + Sync {
fn ready(&self) -> AtomicBool;
} }
impl IpcSocket for ::devtools::TestSocket { impl IpcSocket for ::devtools::TestSocket {
fn ready(&self) -> AtomicBool {
AtomicBool::new(true)
}
} }