Keep adding one book at a time to the sorted sub-line, comparing and swapping the new book with the one before it until it's correctly placed among the books sorted so far.
每次将一本书插入之前已经排列好的队伍中,与前面相邻的一本书进行对比并判断是否交换,直到这本书到达队伍中正确的位置。
单词 | Compare and swap |
释义 |
Compare and swap
原声例句
双语版 TED-Ed 演讲精选 Keep adding one book at a time to the sorted sub-line, comparing and swapping the new book with the one before it until it's correctly placed among the books sorted so far. 每次将一本书插入之前已经排列好的队伍中,与前面相邻的一本书进行对比并判断是否交换,直到这本书到达队伍中正确的位置。
中文百科
比较并交换 Compare-and-swap(重定向自Compare and swap)
比较并交换(compare and swap, CAS),是原子操作的一种,可用于在多线程编程中实现不被打断的数据交换操作,从而避免多线程同时改写某一数据时由于执行顺序不确定性以及中断的不可预知性产生的数据不一致问题。 该操作通过将内存中的值与指定数据进行比较,当数值一样时将内存中的数据替换为新的值。
英语百科
Compare-and-swap 比较并交换(重定向自Compare and swap)
In computer science, compare-and-swap (CAS) is an atomic instruction used in multithreading to achieve synchronization. It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail. The result of the operation must indicate whether it performed the substitution; this can be done either with a simple boolean response (this variant is often called compare-and-set), or by returning the value read from the memory location (not the value written to it). |
随便看 |
|
英汉网英语在线翻译词典收录了3779314条英语词汇在线翻译词条,基本涵盖了全部常用英语词汇的中英文双语翻译及用法,是英语学习的有利工具。