You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <summary>
/// Invoked on the background thread.
/// </summary>
/// <exception cref="SerializationException">An object in the graph of type parameter <typeparamref name="TWrite"/> is not marked as serializable.</exception>
private void WritePipe()
{
while (IsConnected && _streamWrapper.CanWrite)
{
try
{
//using blockcollection, we needn't use singal to wait for result.
//_writeSignal.WaitOne();
//while (_writeQueue.Count > 0)
{
_streamWrapper.WriteObject(_writeQueue.Take());
_streamWrapper.WaitForPipeDrain();
}
}
catch
{
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//we must igonre exception, otherwise, the namepipe wrapper will stop work.
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
}
}
}
If WriteObject fails, it's really impossible to understand why the message was not sent.
For example using a non serializable static variable in a private method of the class used as pipe message.
Thank you,
Filippo.
The text was updated successfully, but these errors were encountered:
Please change this part of your implementation:
If WriteObject fails, it's really impossible to understand why the message was not sent.
For example using a non serializable static variable in a private method of the class used as pipe message.
Thank you,
Filippo.
The text was updated successfully, but these errors were encountered: