Re: NSImage from bitmap - then delete bitmap
Re: NSImage from bitmap - then delete bitmap
- Subject: Re: NSImage from bitmap - then delete bitmap
- From: Alan Snyder <email@hidden>
- Date: Fri, 22 Jul 2016 11:05:12 -0700
Or better yet, have the termination request come from a thread other than the main thread.
> On Jul 22, 2016, at 9:38 AM, Alan Snyder <email@hidden> wrote:
>
>
>> On Jul 22, 2016, at 7:45 AM, Trygve Inda <email@hidden> wrote:
>>
>> Because the main thread sometimes needs to ask the worker threads to
>> terminate. If it does this after performOnMainThread has been called by a
>> worker thread, but before the main thread has processed it, then the main
>> thread will block waiting for the worker thread to exit, but the worker
>> thread has already blocked when it called performOnMainThread.
>>
>> Very rare, but it can happen.
>
> This sounds like a bug to me.
>
> Would this work: The worker thread could set a flag before it calls performOnMainThread and your thread termination code could do something different when this flag is set.
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden