This script ends before it begins thanks to scala 2.10 futures ! This can be quite perturbing if you're new to this programming concept. See futures and promises for more information.

This script contains two general functions, a future select (unfortunately no yet available in scala future api, special thanks to Victor Klang for its help) and an other one asapFuturesProcess that automatically starts a kind of trigger/callback as soon as any new result becomes available.