A completely new version using Threads, sharing variables and async.
data output.