/// <summary> /// 异步发送Cache通知 /// </summary> /// <param name="notifyDataArray">Cache通知数据</param> public void SendNotifyAsync(params CacheNotifyData[] notifyDataArray) { SendDataWrapper sdWrapper = new SendDataWrapper( notifyDataArray, GetSerializedCacheData(notifyDataArray), UdpCacheNotifierSettings.GetConfig().EndPoints); ThreadPool.QueueUserWorkItem(new WaitCallback(SendNotifyThreadCallBack), sdWrapper); }
/// <summary> /// 异步发送Cache通知 /// </summary> /// <param name="notifyDataArray">Cache通知数据</param> public void SendNotifyAsync(params CacheNotifyData[] notifyDataArray) { SendDataWrapper sdWrapper = new SendDataWrapper( notifyDataArray, GetSerializedCacheData(notifyDataArray), UdpCacheNotifierSettings.GetConfig().EndPoints); ThreadPool.QueueUserWorkItem(new WaitCallback(SendNotifyThreadCallBack), sdWrapper); }
private static void SendNotifyThreadCallBack(object context) { SendDataWrapper sdWrapper = (SendDataWrapper)context; SendSerializedData(sdWrapper.OriginalNotifyData, sdWrapper.DataList, sdWrapper.Targets); }