• 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: Creating NSAttributedString objects using WebKit in secondary thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating NSAttributedString objects using WebKit in secondary thread


  • Subject: Re: Creating NSAttributedString objects using WebKit in secondary thread
  • From: Dragan Milić <email@hidden>
  • Date: Tue, 12 May 2009 01:42:50 +0200

On uto 12. 05. 2009., at 00:16, Stephen J. Butler wrote:

2009/5/11 Dragan Milić <email@hidden>:

So, I assume creating attributed strings is not thread safe, but I don't
remember anything like that stated in the documentation. In my opinion, that
looks like a bug.

It is thread safe... if you stick to the Foundation methods. The method you're trying to use, however, is part of the AppKit additions. Hence the non-thread safeness.

One way to do this might be to spawn a helper app that accepts data
somehow (mach ports might be fastest using vm copy-on-write techniques
IIRC, but harder to implement), render on that process's main thread,
and then pass the data back (NSAttributedString supports NSCoding).

Would I necessarily need another helper app? Can I fork another (child) process and implement "server" side in it, which would receive raw bytes and return encoded attributed strings, and subsequently implement "client" side in the parent process (in its secondary thread), which would send raw bytes and receive back encoded attributed strings?


Thanks for the hints.

Milke

_______________________________________________

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


  • Follow-Ups:
    • Re: Creating NSAttributedString objects using WebKit in secondary thread
      • From: Gwynne Raskind <email@hidden>
References: 
 >Creating NSAttributedString objects using WebKit in secondary thread (From: Dragan Milić <email@hidden>)
 >Re: Creating NSAttributedString objects using WebKit in secondary thread (From: Douglas Davidson <email@hidden>)
 >Re: Creating NSAttributedString objects using WebKit in secondary thread (From: Dragan Milić <email@hidden>)
 >Re: Creating NSAttributedString objects using WebKit in secondary thread (From: "Stephen J. Butler" <email@hidden>)

  • Prev by Date: CURLHandle - getting header status
  • Next by Date: Re: Creating NSAttributedString objects using WebKit in secondary thread
  • Previous by thread: Re: Creating NSAttributedString objects using WebKit in secondary thread
  • Next by thread: Re: Creating NSAttributedString objects using WebKit in secondary thread
  • Index(es):
    • Date
    • Thread