fulfil synchronization between rendering trhead and main thread