The ProductionLine polling thread needs to send data to the triage pool, and each thread in the triage pool needs to pass data to the auditing thread.
ProductionLine轮询线程需要向筛选池发送数据,筛选池中的每个线程都需要向审计线程传递数据。
For the purposes of this article, we will create 10 pool threads per ProductionLine object and expand the pool if we run out of threads for any reason.
就本文的目的而言,我们将为每个ProductionLine对象创建10个入池线程,如果出于某些原因耗尽线程,我们还会扩展线程池。
For our example, each production line polling thread will be started in immortal memory and have a scope created up front that's entered each time before querying the ProductionLine.
例如,每个生产线轮询线程都将在不朽内存中启动,查询ProductionLine之前,要为其预先创建一个作用域。
If we consider the WeighingMachine interface, the weighJar() method needs to be frequently polled, so it's sensible to have a dedicated thread for each ProductionLine to make the design scalable.
如果考虑WeighingMachine接口,weighJar()方法需要频繁轮询,因此明智的做法是为每个ProductionLine 使用一个专用线程,使设计可伸缩。
If we consider the WeighingMachine interface, the weighJar() method needs to be frequently polled, so it's sensible to have a dedicated thread for each ProductionLine to make the design scalable.
如果考虑WeighingMachine接口,weighJar()方法需要频繁轮询,因此明智的做法是为每个ProductionLine 使用一个专用线程,使设计可伸缩。
应用推荐