GitHub user diogojc opened a pull request:
https://github.com/apache/thrift/pull/555
(CSharp) Adding lifecycle management for service handlers through
TProcessorFactory
I want to be able to control the lifecycle of the instances implementing my
thrift service handlers (TProcessor).
Before this change the behaviour for every Thrift server is that a service
handler will always be the same instance throughout all requests and therefore
would either need to be stateless or require thread safety.
I've replaced the TProcessor parameter in the constructors of TServer and
subclasses, with a TProcessorFactory so this decision is postponed to the
person creating the object graph by specifying a factory for the processors.
Please help me in figuring out what supporting things I need to change to
reflect this that I haven't done yet.
Diogo.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/diogojc/thrift master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/555.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #555
----
commit 5eae1874669b19eb9baaffb30d3d59b7ea6fc805
Author: unknown <[email protected]>
Date: 2015-07-16T15:06:57Z
replacing TProcessor with TProcessorFactory so the lifecycle of processors
are managed elsewhere
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---