mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-14 01:55:45 +00:00
Wrap remaining Pipe access in lock
This commit is contained in:
parent
29f40b88af
commit
262c3f1b4f
1 changed files with 7 additions and 4 deletions
|
|
@ -24,12 +24,15 @@ public abstract class PipeArgument
|
|||
|
||||
public void Pre()
|
||||
{
|
||||
if (Pipe != null)
|
||||
lock (_pipeLock)
|
||||
{
|
||||
throw new InvalidOperationException("Pipe already has been opened");
|
||||
}
|
||||
if (Pipe != null)
|
||||
{
|
||||
throw new InvalidOperationException("Pipe already has been opened");
|
||||
}
|
||||
|
||||
Pipe = new NamedPipeServerStream(PipeName, _direction, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
|
||||
Pipe = new NamedPipeServerStream(PipeName, _direction, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
|
||||
}
|
||||
}
|
||||
|
||||
public void Post()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue