Skip to content

Commit 789a555

Browse files
author
Andrew Fogarty
committed
Fix return value and clean up logs
1 parent e217942 commit 789a555

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/csharp/Microsoft.Spark/Interop/Ipc/JvmThreadPoolGC.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ private bool TryDisposeJvmThread(int threadId)
109109
if ((bool)_jvmBridge.CallStaticJavaMethod("DotnetHandler", "rmThread", threadId))
110110
{
111111
_loggerService.LogDebug($"GC'd JVM thread {threadId}.");
112+
return true;
112113
}
113114
else
114115
{
115116
_loggerService.LogWarn(
116117
$"rmThread returned false for JVM thread {threadId}. " +
117118
$"Either thread does not exist or has already been GC'd.");
118-
return false;
119119
}
120120
}
121121

@@ -127,7 +127,6 @@ private bool TryDisposeJvmThread(int threadId)
127127
/// </summary>
128128
private void GCThreads()
129129
{
130-
_loggerService.LogDebug("Starting JVM thread GC.");
131130
foreach (KeyValuePair<int, Thread> kvp in _activeThreads)
132131
{
133132
if (!kvp.Value.IsAlive)
@@ -145,8 +144,6 @@ private void GCThreads()
145144
_activeThreadGCTimer = null;
146145
}
147146
}
148-
149-
_loggerService.LogDebug("JVM thread GC complete.");
150147
}
151148
}
152149
}

0 commit comments

Comments
 (0)