In the absence of synchronization, if one thread writes to a variable and another thread reads that same variable, the reading thread could see stale, or out-of-date, data.
没有同步时,如果一个线程读取另外一个线程正在写的变量,读的线程将看到过时的数据。
Whenever you will be writing a variable that may next be read by another thread, or reading a variable that may have last been written by another thread, you must synchronize.
不论什么时候,只要您将编写的变量接下来可能被另一个线程读取,或者您将读取的变量最后是被另一个线程写入的,那么您必须进行同步。
The first result might take you to the fourth page of the thread; click on "first" and start reading.
得到的第一个结果指向这个帖子的第四页,你可以点击“首页”从头开始阅读。
The act of releasing JVM structures lets the GC thread process these structures in a safe fashion; reading and writing to partially updated structures can cause unexpected behavior and crashes.
释放J VM结构的操作让gc线程以一种安全的形式处理这些结构;对部分更新的结构进行读和写操作可能导致不可预测的行为和冲突。
Normally, a new thread would be given the task of reading bytes from a particular socket.
通常会把从特定socket 中读取字节的任务分配给一个新线程。
The best practice in reading a WebSphere Application Server trace is to follow the thread ID in question to understand the flow of events.
阅读WebSphereApplicationServer跟踪文件时的最佳实践是,跟踪所涉及的线程ID,以了解事件流。
Future access to num_proc1 by the parent thread results in the reading in of the data from the cache line.
将来父线程对num_proc1的存取会导致从该高速缓存线路的数据读入。
It is easy to "forget" this rule, especially when reading — but doing so creates numerous risks for the thread-safety of your program.
很容易“忘记”这个规则,特别是在读取时——但是这么做可以造成很多有关程序线程安全的风险。
In multithreaded applications, for example, if multiple threads access the same resource for reading and writing, thread synchronization problems can occur.
例如,在多线程应用程序中,如果多个线程访问相同的资源进行读写访问,则可能会出现线程同步问题。
We all want to know your upgrading plan. Everyone wants to replace stock shock absorbers after poisoned by reading my special thread. Are you an exception?
我们都想知道你的升级计划。在读了老农的毒贴后,每个人都想换减震。你能是个例外吗?
But your idea of having one thread reading from the beginning and another reading from the end will make things slower because seek time is going to kill you.
从一开始读一个线程,从另一个读取结束的想法会使事情变慢,因为寻找时间会杀了你。
So If you just nuke the thread with a patch, you will only get a freeze when reading game resource later.
所以如果你只是用一个补丁核弹线程,你只会得到一个冻结阅读时的游戏资源以后。
Security considerations may have prevented the debugger from reading stack, thread, register, and other context information from the program you are debugging.
出于安全考虑,可能禁止调试器从在调试的程序中读取堆栈、线程和其他上下文信息。
For example, one thread could be updating the contents of a structure while another thread is reading the contents of the same structure.
例如,一个执行绪更新结构的内容时,另一个执行绪读取相同结构的内容。
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
看看代码能不能编译通过,有的时候代码错误会导致这个问题。
Please remember to click "Mark as Answer" on the post that helps you. This can be beneficial to other community members reading the thread.
请记得对您有帮助的回复标注为“解答”。以帮助其他寻找解答及参与社群讨论的朋友们。
Please remember to click "Mark as Answer" on the post that helps you. This can be beneficial to other community members reading the thread.
请记得对您有帮助的回复标注为“解答”。以帮助其他寻找解答及参与社群讨论的朋友们。
应用推荐