和高级操作不同的是,内部的并行操作并不安全,它可能造成数据争用(data races)的情况.还有,如果调用这个内部操作的高级函数出于某种原因不能被编译成并行操作的话,这个内部操作也会失败.
基于46个网页-相关网页
这样做虽然解决了数据争用问题,但是在并发性方面付出了更多的代价,因为在迭代期间锁住整个list会阻塞其他线程,使它们在很长一段时间内不能访问这个列表。
This addresses the data race, but has further costs for concurrency, since locking the entire list while iterating could block other threads from accessing the list for a long time.
如果引起磁盘资源争用问题,请考虑将数据库移动到远程服务器。
If disk contention is a problem, consider moving the database to a remote machine.
另一种管理数据库中写入争用的方法是为一些或所有应用程序数据评估使用NoSQL数据存储的可能性。
Another approach to managing write contention in the database is to evaluate the possibility of using NoSQL data stores for some or all of your application data.
应用推荐