If you have long operations to perform, you should make sure to do them in extra threads (background or worker threads).
如果有耗时的操作,你应该把这些操作放在另外的线程中进行处理(后台线程或者工作线程)。
Specifically, if everything is happening in the UI thread, performing long operations such as network access or database queries will block the whole UI.
如果UI线程需要处理每一件事情,那些耗时很长的操作——诸如访问网络或查询数据库等——将会阻塞整个UI(线程)。
Specifically, if everything is happening in a single thread, performing long operations such as network access or database queries on the UI thread will block the whole user interface.
特别是,如果把所有的事件都放在主线程中来处理,需要长时间来处理的事件比如网络访问或者数据库查询,会阻塞整个UI。
Providing a comfortable glove for surgeons to manoeuvre miniscule robots over a patient's body during long operations could save lives.
在漫长的手术过程中,外科医生戴上舒适的手套就可以操纵微型机器人为病人手术,从而拯救他们的生命。
Since everything happens on a single thread performing long operations, like network access or database queries, on this thread will block the whole user interface.
一旦所有的事件都在一个线程中进行耗时的操作,比如说在这个线程上进行网络连接,数据库访问,会阻塞程序的界面响应。
Since everything happens on a single thread performing long operations, like network access or database queries, on this thread will block the whole user interface.
一旦所有的事件都在一个线程中进行耗时的操作,比如说在这个线程上进行网络连接,数据库访问,会阻塞程序的界面响应。
应用推荐