Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is a task?



On 20 Oct 2007, at 14:23, Bob Ueland wrote:

In 'NSNotificationCenter Class Reference' it says:

Each task has a default notification center.

I wonder what a task is?

The meaning of the word "task" depends on the context. Often (as in this instance), it means the same thing as "process".


In 'Multithreading Programming Topics' it says:

In Mac OS X, each process (application) is made up of one or more threads. ...Threads let your program perform multiple tasks in parallel.... Each
thread has its own execution stack and is scheduled for runtime
separately by the kernel.

In this instance, "task" is being used as a generic term for some unit of work (the word "job" is also commonly used for this, though historically that might also have been confusing). It isn't the same meaning.


From the above description it is clear what a thread is. But what is a task? Can a thread have several tasks with each task having its own default notification center?

No. The process (the first meaning of "task") has a default notification centre. Threads share that notification centre, though it's important to note that notifications will be delivered on the thread that sent them.


Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >What is a task? (From: Bob Ueland <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.