Multi-threaded image processing in python: a program with three transform functions, and a function whose threads randomly atomically access a shared canvas