Are there any cases when it’s preferable to use a plain old Thread object instead of one of the newer constructs?

The Thread class cannot be made obsolete because obviously it is an implementation detail of all those other patterns you mention.

But that’s not really your question; your question is

are there any cases when it’s necessary or useful to use a plain old Thread object instead of one of the above constructs?

Sure. In precisely those cases where one of the higher-level constructs does not meet your needs.

My advice is that if you find yourself in a situation where existing higher-abstraction tools do not meet your needs, and you wish to implement a solution using threads, then you should identify the missing abstraction that you really need, and then implement that abstraction using threads, and then use the abstraction.

Leave a Comment