Classical concurrency problems solved using Scala actors