public static void RemoteAsyncCallBackTakeRemove(IAsyncResult ar) { AsyncTakeRemoveDelegate del = (AsyncTakeRemoveDelegate)((AsyncResult)ar).AsyncDelegate; try { del.EndInvoke(ar); } catch (Exception e) { Console.WriteLine("(TAKEREM) COULD NOT REACH"); } }
private IAsyncResult RemoteAsyncCallTakeRemove(TupleSpace space, ITuple tuple, HashSet <ITuple> locked, string id, int seq) { AsyncTakeRemoveDelegate RemoteDel = new AsyncTakeRemoveDelegate(space.TakeRemove); IAsyncResult RemAr = RemoteDel.BeginInvoke(tuple, locked, id, seq, RemoteAsyncCallBackTakeRemove, null); return(RemAr); }