Home > Back-end >  Java multi-thread concurrency issues
Java multi-thread concurrency issues

Time:09-29



Logic is simple, can traverse a List Then each id to create a thread, to WeChat callback interface to get some data, and then do some processing logic, get some entity class List
Outside the defines the List each thread inside to get a List of the addAll,
Whether addAll each thread processing time will slowly slowly, feeling don't know where there is obstruction, finished thread pool thread is not destroyed or blocked,
How can have a great spirit under the guidance, or commissioning,

CodePudding user response:

Multithreaded call WeChat interface, because it is a network call, network congestion, can monitor the WeChat interface call time,

Can use jstack, jmap JDK bring tools such as monitoring the state of the JVM, analyze the CPU and memory usage, such as tuning processing according to the circumstance,

CodePudding user response:

The realization of the fanList is what? Feeling has been add, if is the expansion of consumption?

CodePudding user response:

About the thread destroyed or memory growth, with reference to the practice of 1/f, used to monitor and practical to view;
Or read through the code running situation,

CodePudding user response:

"Each thread processing time will slowly slow" mean what not understand, what is as a reference to compare?
  •  Tags:  
  • J2ME
  • Related