术语“线程安全"是什么意思? [英] What is the meaning of the term "thread-safe"?

查看:37
本文介绍了术语“线程安全"是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是不是意味着两个线程不能同时改变底层数据?或者这是否意味着当多个线程执行该代码段时,给定的代码段会以可预测的结果运行?

Does it mean that two threads can't change the underlying data simultaneously? Or does it mean that the given code segment will run with predictable results when multiple threads are executing that code segment?

推荐答案

线程安全代码是即使许多线程同时执行也能正常工作的代码.

Thread-safe code is code that will work even if many Threads are executing it simultaneously.

http://mindprod.com/jgloss/threadsafe.html

这篇关于术语“线程安全"是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆