quartz: Make sure pin state cannot change while a flush is in progress.
This commit is contained in:
parent
484c952cf2
commit
493a3a0f9d
@ -387,6 +387,9 @@ static void PullPin_Flush(PullPin *This)
|
|||||||
|
|
||||||
if (This->pReader)
|
if (This->pReader)
|
||||||
{
|
{
|
||||||
|
/* Do not allow state to change while flushing */
|
||||||
|
EnterCriticalSection(This->pin.pCritSec);
|
||||||
|
|
||||||
/* Flush outstanding samples */
|
/* Flush outstanding samples */
|
||||||
IAsyncReader_BeginFlush(This->pReader);
|
IAsyncReader_BeginFlush(This->pReader);
|
||||||
|
|
||||||
@ -405,6 +408,8 @@ static void PullPin_Flush(PullPin *This)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IAsyncReader_EndFlush(This->pReader);
|
IAsyncReader_EndFlush(This->pReader);
|
||||||
|
|
||||||
|
LeaveCriticalSection(This->pin.pCritSec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user