Names of topics - when do you need to know them?

I created a SO question about naming conventions for streams some time ago. The question was something like this: "What should you name the thread?"

In retrospect, the name of the stream matters only if you need to read the name of the stream.

Can you provide real examples of when you had to study flows and distinguish them based on their names? This is an agnostic platform / framework.

How (in what environment) did you do this?

In other words, in what scenarios did you have to solve the problem and need to examine the flows by name and how did you do it?

+6
multithreading
Apr 18 '09 at 6:45
source share
5 answers

When looking for connection leaks in java, it is sometimes useful to trace the object back to see which thread it created. In our case, it was a Finalizer stream. This led us to conclude that things collect garbage, but are not finalized quickly enough. that is, a bunch of things were waiting for completion, which was done in one thread.

As a result, we learned a lesson about not relying on Finalize.

+3
Apr 18 '09 at 7:05
source share

This question is currently marked as "linux" for no apparent reason ... anyway, if you use Visual Studio, the thread name appears in the threads window in the debugger, so if you debug the application using tone threads, the name makes it very easy to find the "thread you care about" in this window in the debugger.

In short, I just use it because it interacts very well with the debugger tools.

+2
Apr 18 '09 at 11:38
source share

Sometimes on Java EE application servers it is useful to be able to track all activity in a single thread, and usually they get the corresponding names by the federated subsystem, for example. "http-25", "http-12", etc.

+1
Apr 18 '09 at 8:51
source share

It is often useful to create dump flows of production servers to determine the causes of freeze / slow. In this case, there will usually be a large number of threads in different roles. In a Java application, you can look at quartz streams, and possibly the various thread pools that the application uses to establish performance guarantees. Perhaps the name of the thread pool is usually more important than the name of the actual thread, but the individual thread names can also be significant if you are trying to identify a stub thread. Since threads usually have a name indicating their role, this helps to understand what is happening.

0
Apr 18 '09 at 7:15
source share

I use thread names to help debug real-time performance of a multi-threaded robot control application written using the Orocos toolchain. Each component runs in a separate thread, and I will write shell scripts that use general-purpose tools to control the priorities of the threads and the kernels on which they run (and, therefore, indirectly, which threads supersede other threads and when). The best part about this is that you can tune the performance of the program while it is running, which is especially useful if you also tune a continuous performance metric.

0
Oct 30 '13 at 8:02
source share



All Articles