Write a standard lock plus "double check" to create a critical section around a variable access.
写一个标准的lock,在访问变量的前后创建临界区,要有“双重检查”。
To ensure that you receive valid data, and don't write bad information to the XML, you access the parameters and set the ok variable accordingly.
要确保能够接收到有效的数据,并且避免将错误信息写入XML,我们可以访问其参数并相应地设置ok变量。
Name: string variable with read and write access.
名称:字符串变量可以读写访问。
应用推荐