A lack of synchronization can be a modeling error if more than the desired process behaviors occur, but it's not always an error (unlike a deadlock).
如果出现的流程行为超过需要,则缺乏同步便是一个建模错误,但它并非始终是一个错误,这一点与死锁不同。
Unfortunately, this might not always be a desired effect.
不幸的是,这种做法并不总是我们想要的。
This may not always be the desired approach, however, and it is likely that the reader thread might want to wait or block itself until the time data becomes available.
但是,这种做法不总是我们想要的,读线程很可能希望等待(即阻塞自身),直到有数据可用时为止。
应用推荐