提交 1d19211d 编写于 作者: A Andrew Au 提交者: GitHub

EventPipe fixes (dotnet/coreclr#24952)



Commit migrated from https://github.com/dotnet/coreclr/commit/902c6b772e9132389cbfea8c759315620e7c0e57
上级 26a9f988
......@@ -460,7 +460,7 @@ void EventPipe::DisableInternal(EventPipeSessionID id, EventPipeProviderCallback
EventPipeSession *EventPipe::GetSession(EventPipeSessionID id)
{
LIMITED_METHOD_CONTRACT;
_ASSERTE(IsLockOwnedByCurrentThread());
CrstHolder _crst(GetLock());
if (s_pSessions == nullptr)
return nullptr;
......
......@@ -616,7 +616,7 @@ EventPipeEventInstance* EventPipeBufferManager::GetNextEvent()
{
CONTRACTL
{
NOTHROW;
THROWS;
GC_NOTRIGGER;
MODE_ANY;
PRECONDITION(!EventPipe::IsLockOwnedByCurrentThread());
......
......@@ -182,7 +182,9 @@ DWORD WINAPI EventPipeSession::ThreadProc(void *args)
pEventPipeSession->SetThreadShutdownEvent();
if (!fSuccess)
pEventPipeSession->Disable();
{
EventPipe::RunWithCallbackPostponed([pEventPipeSession](EventPipeProviderCallbackDataQueue *pEventPipeProviderCallbackDataQueue){pEventPipeSession->Disable();});
}
}
EX_CATCH
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册