Can somebody explain why that makes it work? What about the Application class would break a future? Or what else is going on?
it works! thanks!
Alessandro
Mark Harrah wrote:
Don't use Application. Just use a normal main method. See
http://scala-blogs.org/2008/07/application-trait-considered-harmful.html-Mark
On Tuesday 07 July 2009, turicum wrote:
> object Test extends Application {
>
> val s = future(getData("AAPL\n"))
> val t = getData("INTC\n")
> println(t) // that's fine
> println(s()) // hangs here
>
> def getData(query: String): String = {
> query
> }
> }