• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Threading synchronization: does a primitive exists?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threading synchronization: does a primitive exists?


  • Subject: Re: Threading synchronization: does a primitive exists?
  • From: eveningnick eveningnick <email@hidden>
  • Date: Fri, 06 May 2011 23:29:59 +0300

I do call setNeedsDisplay, but the buffer of the picture that is
queued to be drawn is being reused right after the function of this
'supplying thread' is finished. This is ok as soon as i save/encode
the image in this function - i don't need this buffer anymore. But i
wanted to display it (temporarily for debugging purposes).. Anyway, i
solved the issue with NSCondition :-)
Thanks

2011/5/6 David Duncan <email@hidden>:
> Why not use the production of a frame from your secondary thread to drive calling -setNeedsDisplay on your view? Then you don't need to block any thread (and you really really do not want to block the main thread anyway).
>
> On May 6, 2011, at 1:10 PM, eveningnick eveningnick wrote:
>
>> I need to wait, while the image is drawn (drawRect method is actually
>> called by the framework) from a different thread that supplies frames.
>> I am drawing images just to see that the output is correct, in the
>> final application i don't need them to be drawn on the screen but
>> saved into a file
>>
>> 2011/5/6 Graham Cox <email@hidden>:
>>>
>>> On 05/05/2011, at 11:51 PM, eveningnick eveningnick wrote:
>>>
>>>> What i need - is to stop the thread A immediately after the thread B
>>>> has been spawned by a thread A.
>>>
>>> Hang on. Why use a thread at all? If Thread A simply calls the process B synchronously, it will achieve exactly what you have stated you want - that A will stop when B starts, and will continue when B finishes.
>>>
>>> --Graham
>>>
>>>
>>>
>> _______________________________________________
>>
>> 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
>
> --
> David Duncan
>
>
_______________________________________________

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

References: 
 >Threading synchronization: does a primitive exists? (From: eveningnick eveningnick <email@hidden>)
 >Re: Threading synchronization: does a primitive exists? (From: Heath Borders <email@hidden>)
 >Re: Threading synchronization: does a primitive exists? (From: eveningnick eveningnick <email@hidden>)
 >Re: Threading synchronization: does a primitive exists? (From: Graham Cox <email@hidden>)
 >Re: Threading synchronization: does a primitive exists? (From: eveningnick eveningnick <email@hidden>)
 >Re: Threading synchronization: does a primitive exists? (From: David Duncan <email@hidden>)

  • Prev by Date: Re: Threading synchronization: does a primitive exists?
  • Next by Date: Re: drawing onto CVPixelBuffer
  • Previous by thread: Re: Threading synchronization: does a primitive exists?
  • Next by thread: GCD Is Available On iPhone/iPad
  • Index(es):
    • Date
    • Thread