Tread Local Performance Metrics.

Joined
Mar 27, 2009
Messages
2
Reaction score
0
Is it recommended to use ThreadLocal to store a Thread Context?

I am building a backend server application where there are typical services that I need to run.

Note: We are not building this over a SOA architecture.

Before the start of each service I need to give it a state which has some Service Contex which is variable map to work up on. This variable map is shared when services are running parallelly.

Now for example a service needs to check weather it has to be halted or timed-out based on some thread related parameters.

Question: Is it a good approach to keep the thread context inside thread local and then building api's over service context to access parameters over these variables.

This would help me to hide the complex behavior and it wouldn't open up my internal things.

Thanks,
Aditya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top