FROM : Ian Archer
DATE : Fri Nov 02 20:28:58 2007
I have an app that needs to remain portable across windows and unix,
although I'm trying to put Cocoa in whenever I can on the mac side.
pthreads are prevalent, although mac-specific stuff is all done in nsthread.
Much of the mac code relies on NSNotificationCenter. I'm finding that
one of my objects is not receiving messages from the center (or, in
some cases, receives the first and receives no more).
I guessed this was due to either 1) NSNotificationCenter's thread
separation (e.g. messages can only be received on the thread from
which they are sent), or 2) some weird incompatibility between pthread
and nsthread.
In the object "A" which should be receiving messages but isn't, I
added a thread startup in its init method which basically does nothing
except spin and sleep. Now, this object is receiving messages from
the notificaton center! Does anyone know what might be causing this
strange behavior?
DATE : Fri Nov 02 20:28:58 2007
I have an app that needs to remain portable across windows and unix,
although I'm trying to put Cocoa in whenever I can on the mac side.
pthreads are prevalent, although mac-specific stuff is all done in nsthread.
Much of the mac code relies on NSNotificationCenter. I'm finding that
one of my objects is not receiving messages from the center (or, in
some cases, receives the first and receives no more).
I guessed this was due to either 1) NSNotificationCenter's thread
separation (e.g. messages can only be received on the thread from
which they are sent), or 2) some weird incompatibility between pthread
and nsthread.
In the object "A" which should be receiving messages but isn't, I
added a thread startup in its init method which basically does nothing
except spin and sleep. Now, this object is receiving messages from
the notificaton center! Does anyone know what might be causing this
strange behavior?
| Related mails | Author | Date |
|---|---|---|
| Ian Archer | Nov 2, 20:28 | |
| Chris Kane | Nov 3, 16:40 |






Cocoa mail archive

