Skip to content

PerformSelector:afterDelay:这个方法在子线程中是否起作用?为什么?怎么解决? #118

@tbfungeek

Description

@tbfungeek

不起作用,子线程默认没有 Runloop,也就没办法添加 Timer。
解决的办法是可以使用 GCD 来实现:Dispatch_after 或者为当前线程添加Runloop。建议使用第一种。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions