jrswizzle icon indicating copy to clipboard operation
jrswizzle copied to clipboard

Block-based methods are not thread safe

Open JetForMe opened this issue 5 years ago • 0 comments

Swizzling with a block requires using a single NSInvocation instance to call the original method. But if you need to set arguments on that invocation, you might be stepping on other threads doing the same thing.

A possible fix is to copy the invocation before modifying it.

JetForMe avatar Feb 27 '19 01:02 JetForMe