}
if (needReset)
- pThread->InternalReset(FALSE, TRUE, TRUE, FALSE);
+ pThread->InternalReset(TRUE, TRUE, FALSE);
HELPER_METHOD_FRAME_END();
}
CallFinalizer(fobj);
}
}
- pThread->InternalReset(FALSE);
+ pThread->InternalReset();
}
else
{
&args,
pThreadTurnAround);
}
- pThread->InternalReset(FALSE);
+ pThread->InternalReset();
// process the object we got back or be done if we got back null
pReturnObject = OBJECTREFToObject(args.fobj);
GCPROTECT_END();
if(!pThread->IsRealThreadPoolResetNeeded())
{
pThread->ResetManagedThreadObjectInCoopMode(ThreadNative::PRIORITY_NORMAL);
- pThread->InternalReset(FALSE, TRUE, FALSE, FALSE);
+ pThread->InternalReset(TRUE, FALSE, FALSE);
if(ThreadpoolMgr::ShouldGrowCompletionPortThreadpool(ThreadpoolMgr::CPThreadCounter.DangerousGetDirtyCounts()))
{
//We may have to create a CP thread, go back to the Vm, and process the packet there.
{
pThread->EEResetAbort(Thread::TAR_ALL);
}
- pThread->InternalReset(FALSE);
+ pThread->InternalReset();
}
endTime = GetTickCount();
return nPriority;
}
-void Thread::FullResetThread()
-{
- CONTRACTL {
- NOTHROW;
- GC_TRIGGERS;
- }
- CONTRACTL_END;
-
- GCX_COOP();
-
- // We need to put this thread in COOPERATIVE GC first to solve race between AppDomain::Unload
- // and Thread::Reset. AppDomain::Unload does a full GC to collect all roots in one AppDomain.
- // ThreadStaticData used to be coupled with a managed array of objects in the managed Thread
- // object, however this is no longer the case.
-
- // TODO: Do we still need to put this thread into COOP mode?
-
- GCX_FORBID();
- DeleteThreadStaticData();
-
- m_alloc_context.alloc_bytes = 0;
- m_fPromoted = FALSE;
-}
-
BOOL Thread::IsRealThreadPoolResetNeeded()
{
CONTRACTL
return FALSE;
}
-void Thread::InternalReset(BOOL fFull, BOOL fNotFinalizerThread, BOOL fThreadObjectResetNeeded, BOOL fResetAbort)
+void Thread::InternalReset(BOOL fNotFinalizerThread, BOOL fThreadObjectResetNeeded, BOOL fResetAbort)
{
CONTRACTL {
NOTHROW;
nPriority = ResetManagedThreadObject(nPriority);
}
- if (fFull)
- {
- FullResetThread();
- }
-
-
//m_MarshalAlloc.Collapse(NULL);
if (fResetAbort && IsAbortRequested()) {
STDMETHODIMP EndPreventAsyncAbort()
DAC_EMPTY_RET(E_FAIL);
- void InternalReset (BOOL fFull, BOOL fNotFinalizerThread=FALSE, BOOL fThreadObjectResetNeeded=TRUE, BOOL fResetAbort=TRUE);
+ void InternalReset (BOOL fNotFinalizerThread=FALSE, BOOL fThreadObjectResetNeeded=TRUE, BOOL fResetAbort=TRUE);
INT32 ResetManagedThreadObject(INT32 nPriority);
INT32 ResetManagedThreadObjectInCoopMode(INT32 nPriority);
BOOL IsRealThreadPoolResetNeeded();
-private:
- //Helpers for reset...
- void FullResetThread();
public:
HRESULT DetachThread(BOOL fDLLThreadDetach);
if (pThread) {
if (pThread->IsAbortRequested())
pThread->EEResetAbort(Thread::TAR_ALL);
- pThread->InternalReset(FALSE);
+ pThread->InternalReset();
}
}
{
if (pThread->IsAbortRequested())
pThread->EEResetAbort(Thread::TAR_ALL);
- pThread->InternalReset(FALSE);
+ pThread->InternalReset();
}
}
if (pThread) {
if (pThread->IsAbortRequested())
pThread->EEResetAbort(Thread::TAR_ALL);
- pThread->InternalReset(FALSE);
+ pThread->InternalReset();
}
}
else