Github user sarutak commented on a diff in the pull request:
https://github.com/apache/spark/pull/5187#discussion_r27157302
--- Diff: core/src/main/scala/org/apache/spark/ui/UIWorkloadGenerator.scala
---
@@ -99,12 +103,17 @@ private[spark] object UIWorkloadGenerator {
} catch {
case e: Exception =>
println("Job Failed: " + desc)
+ } finally {
+ barrier.release()
}
}
}.start
Thread.sleep(INTER_JOB_WAIT_MS)
}
}
+
+ // Waiting for threads.
+ barrier.acquire()
--- End diff --
It's because I didn't think it's simple to use `join()`; we need to
allocate array for those threads and the main thread should call for each
thread in the array.
But, I also think it's simpler to use `CounDownLatch` instead of Semaphore
right?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]