These messages must be called on main.#2814
Conversation
|
@nguyenhuy does this look right to you? |
nguyenhuy
left a comment
There was a problem hiding this comment.
Yes, these methods should be called on main. I'm down for this approach. But I have one question: Should we capture strong self in these new blocks?
|
@nguyenhuy it should be fine because nothing is retaining the block itself? |
|
@garrettmoon I was just worrying that in rare cases, we might end up keeping these nodes around for a bit longer than needed. But this is definitely an improvement. |
|
@nguyenhuy oh good point! I wonder if they should be though? |
|
@garrettmoon Thinking more about it, I think we actually want them to be around. For example, an image node should be kept alive until it clears its contents (i.e cache entry, placeholder image, etc). |
|
@nguyenhuy could you share with me (maybe in an email, once you're up tomorrow) what changed in this area to cause off-main thread calls to occur? This didn't occur in practice before 2.0, right? |
Resolves #2813