博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
.NET:race conditions
阅读量:7177 次
发布时间:2019-06-29

本文共 857 字,大约阅读时间需要 2 分钟。

race conditions (when an anomalous result occurs due to an unexpected critical dependence on the timing of two events).

A race condition occurs when two or more threads can access shared data and they try to change it at the same time. Because the thread scheduling algorithm can swap between threads at any time, you don't know the order in which the threads will attempt to access the shared data. Therefore, the result of the change in data is dependent on the thread scheduling algorithm, i.e. both threads are "racing" to access/change the data.

Problems often occur when one thread does a "check-then-act" (e.g. "check" if the value is X, then "act" to do something that depends on the value being X) and another thread does something to the value in between the "check" and the "act".

 

http://stackoverflow.com/questions/34510/what-is-a-race-condition

转载地址:http://hibzm.baihongyu.com/

你可能感兴趣的文章
css布局
查看>>
Java之匿名类讲解
查看>>
转:Vim实战指南(一):基础编辑命令
查看>>
java新知识系列 五
查看>>
数组B - 我想我需要一艘船屋
查看>>
elasticsearch1.0 升级2.2的数据备份和恢复
查看>>
苹果推送服务器端证书配置.pem生成
查看>>
《将博客搬至CSDN》
查看>>
[转载]步进电机原理介绍与基于STM32的SPWM驱动步进电机,使用软件实现电机细分...
查看>>
Windows下安装Redis服务
查看>>
序列化和反序列化的几种方式(DataContractSerializer)(二)
查看>>
比赛注意事项
查看>>
uva-10905-贪心
查看>>
(转)Google Code SVN密码的解决之道(2010-11-14 20:36:51)转载▼
查看>>
tmux使用笔记
查看>>
Ubuntu12.04.1 LTS Installion
查看>>
Jetty 的工作原理以及与 Tomcat 的比较
查看>>
20170913-构建之法:现代软件工程-阅读笔记
查看>>
实验一 Linux开发环境的配置 20145213祁玮 20145222黄亚奇
查看>>
站立会议4
查看>>