2008年6月15日星期日

Perl : 防止Gtk2程序界面由于进程处理长时间事件而僵死 freeze

来源:Controlling Program Flow

当我们在Gtk2主循环外处理一些耗时较长的事件的时候,要记得加
Gtk2->main_iteration while (Gtk2->events_pending);
防止界面僵死。 

Gtk2->events_pending 在事件山全部处理完毕之前将一直返回true。

没有评论:

发表评论