I would like to know what the best in terms of industry practice way is to read in a file using multithreaded approach. In Java I would do something of the following sort:
class Reader { Result readFile(File file, Listener callback) }
class Listener { void process(Result r) }
Reader would spawn another thread to generate a result and then call back the Listener from withing the working thread. Would this be a good approach? How would this translate into Scala, which probably has other, better mechanisms to achieve this?