Add frame display loop
Reset tile index in a thread safe way.