• 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: NSTextStorage: Deadlock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextStorage: Deadlock


  • Subject: Re: NSTextStorage: Deadlock
  • From: Satoshi Matsumoto <email@hidden>
  • Date: Thu, 04 Mar 2004 09:27:53 +0900

on 04.3.4 0:04 AM, Basil Achermann at email@hidden wrote:
> I have an application with two threads, a main (GUI input) thread and a
> worker thread which does some processing and occasionally updates
> values in one of the application's NSTextViews. However, the app
> frequently hangs if the text which is about to be replaced is currently
> selected.

NSTextSorage is mutable object.

Documentation>Cocoa>Resource Management>Multithreading>Thread Safety
says...

Immutable objects are generally thread-safe. Once you create them, you can
safely pass these objects to and from threads. On the other hand, mutable
objects are not thread-safe. To use mutable objects in a threaded
application, the application must synchronize appropriately.

-----

I always wish if I could use mutable objects in multi-thread....


Satoshi,

-----------------------------------------------------
Satoshi Matsumoto <email@hidden>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802
_______________________________________________
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: 
 >NSTextStorage: Deadlock (From: Basil Achermann <email@hidden>)

  • Prev by Date: progress during HTTP POST upload?
  • Next by Date: NSDocument backups
  • Previous by thread: Re: NSTextStorage: Deadlock
  • Next by thread: Re: NSTextStorage: Deadlock
  • Index(es):
    • Date
    • Thread