On 4/3/2010 12:26 AM, Paul Herring wrote:
> On Fri, Apr 2, 2010 at 6:55 PM, Knowledge Seeker
> <[email protected]> wrote:
>
>> On 4/2/2010 11:00 PM, Gerald Dunn wrote:
>>
>>>> Crux of the discussion ....Thread is needed where one thinks that a
>>>> aysnc-operation is needed .
>>>>
>>>>
>>> Basically you have it. I'd expand it to say when want concurrent tasks.
>>>
>>>
>> Do the 'concurrent tasks' means ... non-dependable / independent
>> concurrent tasks ? By independent I mean there is no concept of
>> producer-consumer, as the producer-consumer are dependent on each other
>> to fill-empty the buffer they share in between.
>>
> Some of the stuff we write at work could probably count as 'drivers'
> for a variety of modems. (They're more use-level than OS level
> however.)
>
> Each driver knows how to start each modem, how to (frequently) query
> the modem for data we need (signal strength, rx/tx speeds etc,) and
> also check to see whether the modem is actually providing
> connectivity. This latter is performed within the driver in a separate
> thread pinging an address once a second.
>
> I suppose that counts as concurrent tasks.
>
>
>
With the above scenario, it means that each driver-thread is independent
of each-other, there is no sharing of data between them, hence I agree
that multithreading is a good choice over here.