I have a trouble when try to use Matcher in multithreaded applications.
I found the following guide from Jregex website:
"the typical tactics in multithreaded applications is to have one Pattern instance per expression(a singleton), and one Matcher object per thread."
Who can show me the Java code ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I interpret it as Pattern objects can be static (shared between multiple threads), whereas each thread uses its own Matcher object (local variable instead of a static member).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a trouble when try to use Matcher in multithreaded applications.
I found the following guide from Jregex website:
"the typical tactics in multithreaded applications is to have one Pattern instance per expression(a singleton), and one Matcher object per thread."
Who can show me the Java code ?
I interpret it as Pattern objects can be static (shared between multiple threads), whereas each thread uses its own Matcher object (local variable instead of a static member).