• 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: question about CoreMIDI & cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about CoreMIDI & cocoa


  • Subject: Re: question about CoreMIDI & cocoa
  • From: john <email@hidden>
  • Date: Tue, 28 Sep 2004 20:25:05 -0400

Hi Robert,

I see, communication between threads is definitely not always straightforward. I personally always use performSelectorOnMainThread: in CA ioprocs. I've never gotten spanked :) Communicating between threads would probably be the better alternative, but performSelectorOnMainThread is just so easy!

I should have put that in the example code I posted.

-- John


Hi John,

Certainly calling Obj-C methods from C code is not a problem - it's the thread communication that's the problem as AppKit is not generally thread-safe.

I seem to remember getting spanked over using the approach the Shaun suggests (performSelectorOnMainThread) as it allocates memory which can block the MIDI thread (perhaps I'm mis-remembering) - various non-blocking queueing mechanisms were then discussed - it's all in the archives.

Anyway - for most apps performSelectorOnMainThread will do the job - IMHO (which I would have suggested if I had not gone through the spanking before ;-))

Robert.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >question about CoreMIDI & cocoa (From: Khamba Staring <email@hidden>)
 >Re: question about CoreMIDI & cocoa (From: Robert Grant <email@hidden>)
 >Re: question about CoreMIDI & cocoa (From: john <email@hidden>)
 >Re: question about CoreMIDI & cocoa (From: Robert Grant <email@hidden>)

  • Prev by Date: Re: question about CoreMIDI & cocoa
  • Next by Date: Re: SysEx Progress
  • Previous by thread: Re: question about CoreMIDI & cocoa
  • Next by thread: Re: question about CoreMIDI & cocoa
  • Index(es):
    • Date
    • Thread