spark-scala - theads not executing skipping Await.ready

Viewed 20

Await.ready is not working.. not holding the main thread until future threads execute

    val futures = for (stagingEntity <- stagingEntities) yield Future {
           print("123")         
    }
    
    for (f <- futures) {
       Await.ready(f, Duration.Inf)
    }
    print("456") 
    
    output is : 456
    
    123 - not printing

i tried main times some time working some time not.. could you please help... most appreciated.

i am checking spark application

0 Answers
Related