|
Boost : |
From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 2000-08-03 11:25:31
Joe Gottman wrote:
> I think library writers want to be
> able to write code that uses threads without knowing what thread
> implementation a given client will use.
If we don't want to impose a particular implementation, yes.
> Since the client should know at
> compile time what thread implementation he will use, if the library writer
> can write a template class that takes a Thread class as one of its template
> parameters then the client can instantiate the template with whatever kind
> of threads work on his machine.
But why do you need templates ?
> This only works, however, if there is some
> common interface that the template writer can assume is used by any
> implementation.
Indeed. Some people have questioned wether such a common interface
is realistic. But Java did it, why not C++ ?
-- Valentin Bonnard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk