> On Mar 16, 2023, at 2:15 PM, Alan Snyder <[email protected]> wrote:
>
> The test for already being on the main thread should be performed in one
> place, in this method:
>
>> On Mar 16, 2023, at 6:07 AM, Michael Hall <[email protected]> wrote:
>>
>> [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
>>
>
>
If it is and the block code is subsequently run without anything like the
following
if (async)
[instance performSelectorOnMainThread:@selector(callback)
withObject:nil waitUntilDone:NO];
else
[instance performSelectorOnMainThread:@selector(callback)
withObject:nil waitUntilDone:YES];
Then I am mistaken.
I had sort of decided against testing this myself instead seeing if the main
thread callback code I posted earlier would provide a workaround.
But maybe I will still also test to see if already being on the main thread
actually is or is not the problem. I’m not sure what other difference there
would be on run on first thread?