Skip to content

Class Mocks Not Thread-Safe #328

Closed
Closed
@alanterranova

Description

@alanterranova

Hi Erik,

I’m debugging thread safety in OCMock 3 and have an example test case that demonstrates some faulty behavior. In short, it looks like invoking a class method from a background thread while a class mock is being restored causes crashes due to unrecognized selectors.

Strangely, this isn’t a problem with OCMock 2. I suspect 1ad7292 may have something to do with it.

I realize this is a contrived example, but it’s flaky enough to prevent me from upgrading my project from v2 to v3.

Thanks,

Alan

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions