Do Notifications thread?

  • Hey guys

    Please excuse my lack of terminology.  I have a question if sending
    notifications "threads"?  I know that isn't the right wording..  What
    I mean is if I have the following scenario:

    object 1: send off NS(Distributed)NotificationCenter  "COUNT TO ONE TRILLION"
    object 2: receives notification to count to one billion, starts to count
    object 1: NSLog(@"hello!")

    Will object 1 continue with it's code before object 2 counts to one
    trillion, or will object 1 have to wait until object 2 counts to one
    trillion before it continues with its code?  (ie, will object 1 say
    "Hello" before object two counts to one billion?)

    Thank you very much,
    AA
  • Hi Aychamo,

    Yes, Object 1 will only display "Hello" when Object 2 will be done
    counting, so it will have to wait. If you want to use threads, you
    really need to start a new thread.

    Hope this helps,

    On 16 oct. 06, at 16:34, Aychamo Aychamo wrote:

    > Hey guys
    >
    > Please excuse my lack of terminology.  I have a question if sending
    > notifications "threads"?  I know that isn't the right wording..  What
    > I mean is if I have the following scenario:
    >
    > object 1: send off NS(Distributed)NotificationCenter  "COUNT TO ONE
    > TRILLION"
    > object 2: receives notification to count to one billion, starts to
    > count
    > object 1: NSLog(@"hello!")
    >
    > Will object 1 continue with it's code before object 2 counts to one
    > trillion, or will object 1 have to wait until object 2 counts to one
    > trillion before it continues with its code?  (ie, will object 1 say
    > "Hello" before object two counts to one billion?)
    >
    > Thank you very much,
    > AA
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/dtapie%
    > 40softronmedia.com
    >
    > This email sent to <dtapie...>
    >

    Daniel Tapie
    --------------------------------------------
    email: <dtapie...>
    website: www.softronmedia.com
    --------------------------------------------
    Softron Media Services, a division of
    Softron Microcomputing S.A./N.V.
    av. Molière, 470
    B-1050 Brussels - Belgium
    Phone (Int'):  +32 2 771 73 71
    Phone (France):  08 11 03 55 00
    Fax:            +32 2 706 52 66
    --------------------------------------------
    Intelligent Broadcasting Systems, Inc.
    c/o Barb Maes
    409 Periwinkle Way
    Prospect Heights, IL  60070-2905
    Phone: (847) 960-3543
    Fax:  (847) 655-6086
    --------------------------------------------
  • El 16/10/2006, a las 16:34, Aychamo Aychamo escribió:

    > object 1: send off NS(Distributed)NotificationCenter  "COUNT TO ONE
    > TRILLION"
    > object 2: receives notification to count to one billion, starts to
    > count
    > object 1: NSLog(@"hello!")
    >
    > Will object 1 continue with it's code before object 2 counts to one
    > trillion, or will object 1 have to wait until object 2 counts to one
    > trillion before it continues with its code?  (ie, will object 1 say
    > "Hello" before object two counts to one billion?)

    I can think of one really easy way to find this out...
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today