Github user li-zhihui commented on a diff in the pull request:

    https://github.com/apache/spark/pull/900#discussion_r13688559
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala ---
    @@ -431,6 +431,16 @@ private[spark] class TaskSchedulerImpl(
     
       // By default, rack is unknown
       def getRackForHost(value: String): Option[String] = None
    +  override def waitBackendReady():Unit={
    +    if(backend.isReady){
    +      return
    +    }
    +    while(!backend.isReady){
    +      synchronized{
    +        this.wait(100)
    --- End diff --
    
    Just for programming simply. :)
    If someone would like to implement more backend implementations or change 
backend.isReady somewhere, they needn't to call NOTIFY().
    
    But, waiting 100 milliseconds maybe too long, is 10 milliseconds OK?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to