Skip to content

Commit 963f8a4

Browse files
Copilotjkotas
andauthored
Remove unnecessary PulseAllHelper method (#121132)
Delete the unnecessary It is not needed by any documented behavior. It appears to be a leftover from early Thread or Monitor implementations. Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
1 parent addf696 commit 963f8a4

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/coreclr/vm/comsynchronizable.cpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -137,32 +137,6 @@ static void KickOffThread_Worker(LPVOID ptr)
137137
CALL_MANAGED_METHOD_NORET(args);
138138
}
139139

140-
// Helper to avoid two EX_TRY/EX_CATCH blocks in one function
141-
static void PulseAllHelper(Thread* pThread)
142-
{
143-
CONTRACTL
144-
{
145-
GC_TRIGGERS;
146-
DISABLED(NOTHROW);
147-
MODE_COOPERATIVE;
148-
}
149-
CONTRACTL_END;
150-
151-
EX_TRY
152-
{
153-
// GetExposedObject() will either throw, or we have a valid object. Note
154-
// that we re-acquire it each time, since it may move during calls.
155-
pThread->GetExposedObject()->EnterObjMonitor();
156-
pThread->GetExposedObject()->PulseAll();
157-
pThread->GetExposedObject()->LeaveObjMonitor();
158-
}
159-
EX_CATCH
160-
{
161-
// just keep going...
162-
}
163-
EX_END_CATCH
164-
}
165-
166140
// When an exposed thread is started by Win32, this is where it starts.
167141
static ULONG WINAPI KickOffThread(void* pass)
168142
{
@@ -203,8 +177,6 @@ static ULONG WINAPI KickOffThread(void* pass)
203177

204178
ManagedThreadBase::KickOff(KickOffThread_Worker, NULL);
205179

206-
PulseAllHelper(pThread);
207-
208180
GCX_PREEMP_NO_DTOR();
209181

210182
pThread->ClearThreadCPUGroupAffinity();
@@ -295,7 +267,6 @@ extern "C" void QCALLTYPE ThreadNative_Start(QCall::ThreadHandle thread, int thr
295267
{
296268
GCX_COOP();
297269

298-
PulseAllHelper(pNewThread);
299270
pNewThread->HandleThreadStartupFailure();
300271
}
301272

0 commit comments

Comments
 (0)