make it multi-threaded to avoid to block GTK thread.