关于sheet线程安全问题

来源:互联网 发布:淘宝网被限制登录 编辑:程序博客网 时间:2024/04/29 12:47

- (void)beginSheet:(NSWindow *)sheet modalForWindow:(NSWindow *)docWindow modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo

上面函数只能在主线程运行,在后台线程运行可能会有意想不到的异常。


同样,NSBeginSheet也一样。