• 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 - How its done?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threading - How its done?


  • Subject: Re: Threading - How its done?
  • From: "Michael Ash" <email@hidden>
  • Date: Tue, 6 May 2008 12:34:44 -0400

On Tue, May 6, 2008 at 12:46 AM, Karl von Moller
<email@hidden> wrote:
> Many thanks for your reply on this - much appreciated. I did think it had
> something to do with the images being swapped out as often the crashes
> occurred as I quickly changed selection in the table view. Because I know
> nothing about threading, I resorted to anything to lock the threads. That's
> why you see my silly attempt at Locking!

I mean no offense by any of this, but threading is a really complex
and difficult subject that you can't really just jump into and try to
get something working by trial and error. Partly this is because it's
difficult to the extent that you can't reasonably learn it by trial
and error. Partly this is because threading bugs are often extremely
subtle and it's entirely reasonable to write code which works fine for
you now but which breaks in extremely difficult to debug ways later
on.

There are lots of articles out there on general problems in
multithreading, locks, synchronization, message passing, and such. For
Apple-specific documentation, I'd recommend:

Threaded Programming Guide:
http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/Introduction/chapter_1_section_1.html

Cocoa Fundamentals Guide: Multithreaded Cocoa Programs:
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/AddingBehaviortoaCocoaProgram/chapter_4_section_6.html

This is part of the first article but it's really important so I'm
including it separately, Cocoa thread safety guidelines:
http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/chapter_950_section_2.html#

I highly encourage reading through all of those and any other
resources you can lay hands on. Your current path will at best result
in a program which works *most* of the time.

Mike
_______________________________________________

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: 
 >RE: Threading - How its done? (From: Karl von Moller <email@hidden>)
 >Re: Threading - How its done? (From: Michael Vannorsdel <email@hidden>)
 >Re: Threading - How its done? (From: Karl von Moller <email@hidden>)

  • Prev by Date: Re: -draggingEntered: never gets called [solved?]
  • Next by Date: Re: Multiple controls in a table cell
  • Previous by thread: Re: Threading - How its done?
  • Next by thread: RE: Threading - How its done?
  • Index(es):
    • Date
    • Thread