非线程安全类通常可以安全地在多线程程序中使用,只要您能确保一个线程所用的类的实例不被其它线程使用。
A class that is not thread-safe can often be used safely in a multithreaded program as long as you ensure that instances of that class used by one thread are not used by other threads.
每一次服务调用都创建一个新的线程实例吗,类似于每一个http请求同一个servlet的多线程实例?
Is a new thread instance created for each call to a service, like there are multiple thread instances of the same servlet for each HTTP request addressed to it?
频率合成器是多线程的,因此他们必须在程序的一个实例,使静态和静态构造函数的地方。
The Synthesizer is multi-threaded, therefore they must only be one instance in the program, so make a static one somewhere with a static constructor.
应用推荐