You need to make really certain this is not running on the UI thread. I suggest you make this code async instead using signals/`NewClosure()`