eigengo / scalad

Scala Data access for NoSQL databases
47 stars 15 forks source link

Async/future execution #3

Closed janm399 closed 11 years ago

janm399 commented 12 years ago

Include Asynchronous execution policy that supports

val jdbc = new JDBC(ds) with Iteratees with Asynchronous
val pu = jdbc.select("<<USERS WITH ORDERS>>", list[User])(...)
val po = jdbc.select("<<THE ORDERS>>", list[Order])(...)

// do some work, while pu and po are executing

for (u <- pu) { 
  // pu now needs to be ready
}

po(0) // po now needs to be ready