由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 怎样判断什么情况下不会出现race condition
相关主题
请教个script问题使用assert应遵循什么原则?
java producer consumer problem (转载)waiting for N condition variables in linux
谁能推荐一个read-writer lock的C++实现? (转载)c#怎么测试deadlock, race condition啊?
用pseudo-code 写数据结构问题。Windows XP与Multithreading Programming
an interview questionPthread support on Windows XP
请问static variable init的问题?请教c++ multithreading入门问题
请教cosnt的使用register variable
looking for c++ programmerslambda的一个疑问
相关话题的讨论汇总
话题: race话题: condition话题: 判断话题: 不会话题: programmer
进入Programming版参与讨论
1 (共1页)
s********k
发帖数: 6180
1
如果一个变量在多处被赋值,是不是首先假定会存在race condition?怎样判断什么情
况下不会出现race condition?
或者是首先假定不会有race condition,然后判断什么情况下会有race condition?
c***d
发帖数: 996
2
能不能说具体点的例子, 给个pseudo code啥的。

【在 s********k 的大作中提到】
: 如果一个变量在多处被赋值,是不是首先假定会存在race condition?怎样判断什么情
: 况下不会出现race condition?
: 或者是首先假定不会有race condition,然后判断什么情况下会有race condition?

s********k
发帖数: 6180
3
比较难说code,因为完全不在同一个文件里面。基本的是类似reentrant问题,系统接
收一个信息,然后改变Variable A,然后执行复杂操作,里面有改变A,同时系统也有
可能继续接收信息。
本身系统不是multithread的,但是这样会不会有问题?

【在 c***d 的大作中提到】
: 能不能说具体点的例子, 给个pseudo code啥的。
f****g
发帖数: 313
4
it is a run-time bug... cannot to debug.. very annoying
Programmer needs to analyze the situation by hand. But there might be some
static analysis tool which helps you to scope down the code the programmer
should look at.

【在 s********k 的大作中提到】
: 比较难说code,因为完全不在同一个文件里面。基本的是类似reentrant问题,系统接
: 收一个信息,然后改变Variable A,然后执行复杂操作,里面有改变A,同时系统也有
: 可能继续接收信息。
: 本身系统不是multithread的,但是这样会不会有问题?

1 (共1页)
进入Programming版参与讨论
相关主题
lambda的一个疑问an interview question
sql 数据是存在哪里 (转载)请问static variable init的问题?
[求教大虾]关于C++编译期变量和运行期变量的区别,总是有疑惑请教cosnt的使用
问一个关于ANSI C中system命令的问题looking for c++ programmers
请教个script问题使用assert应遵循什么原则?
java producer consumer problem (转载)waiting for N condition variables in linux
谁能推荐一个read-writer lock的C++实现? (转载)c#怎么测试deadlock, race condition啊?
用pseudo-code 写数据结构问题。Windows XP与Multithreading Programming
相关话题的讨论汇总
话题: race话题: condition话题: 判断话题: 不会话题: programmer