On Fri, 2006-05-19 at 10:47 +0900, minchan Kim wrote:
they're different usage patterns:
the basic completion pattern is when you set something up that at some
point in the future gets finished, for example, you could schedule a
disk IO, and when the IO actually finishes, the completion would be
called. Eg there generally is a "task" that at some point gets
'completed'.
A semaphore.. isn't used much anymore, a mutex is used instead.
A mutex is basically a short term exclusion tool, eg the pattern is
<take mutex>
<do some actions>
<release mutex>
unlike completions, there is a strong sense of "who takes the mutex
releases it", and the there is a well defined task "in the middle",
while for completions it is "something else finishes it".
Does this help?
_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.comhttp://selenic.com/mailman/listinfo/kernel-mentors