R.Ghetta created THRIFT-5295:
--------------------------------
Summary: Thread and ThreadFactory should be extensible
Key: THRIFT-5295
URL: https://issues.apache.org/jira/browse/THRIFT-5295
Project: Thrift
Issue Type: Improvement
Components: C++ - Library
Affects Versions: 0.13.0
Reporter: R.Ghetta
Fix For: 0.14.0
Thread and ThreadFactory are both declared final, making impossible to extend
them without duplicating or reimplementing much code.
As an example, to customize thread startup with TNonblockingServer, you need to
copy or reimplement not only ThreadFactory and Thread, but also Task, Runnable
and TNonblockingServer.
TNonblockingServer always creates Task instances, and Task descends from
Runnable, containing a Thread pointer.
Removing final and making some methods virtual will allow everyone to customize
Thread without resorting to code duplication.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)