Multithreaded script that works in Linux and Win32.