Provide a programming example in which multithreading does not provide better performance than a single-threaded solution.