• 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: Cocoa - multithread safe?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa - multithread safe?


  • Subject: Re: Cocoa - multithread safe?
  • From: Chris Ridd <email@hidden>
  • Date: Wed, 13 Aug 2003 07:37:45 +0100

On 12/8/03 11:15 pm, Tim Hewett <email@hidden> wrote:

> Is Cocoa spec'd to be MT-safe? I'm getting overlayed text in
> a NSTextField on occasions, suspectedly caused by multiple
> threads calling setStringValue without semaphore protection
> causing the text each thread is asking to be set to be overlayed
> with that of another thread.
>
> Also some threads cannot open an NSDrawer...
>
> Is this a bug or is Cocoa not defined as being MT-safe (so am
> I being very lucky most of the time)?
>
> Tim.

You're being lucky most of the time, because bits of Cocoa are not
thread-safe.

Read:

<http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/Co
ncepts/safety.html>

I'd suspect the comment about using mutable objects applies to things like
NSTextViews.

Cheers,

Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Cocoa - multithread safe? (From: Tim Hewett <email@hidden>)

  • Prev by Date: Saving to the home folder
  • Next by Date: Re: ScreenSaver with a subview won't preview
  • Previous by thread: Cocoa - multithread safe?
  • Next by thread: Saving to the home folder
  • Index(es):
    • Date
    • Thread