mutable
mutable 英 ['mjuːtəb(ə)l] 美 ['mjutəbl]
adj. 易变的,不定的;性情不定的
- 请先登录
- adj. 易变的,不定的;性情不定的
-
1. More often than not, they involve mutable object state.
而它们时常也会涉及易变的对象状态。
-
2. Methods you call shouldn't depend on the mutable state of any object and should return fully reproducible and predictable results.
您所调用的方法不应依赖于任何对象的易变状态,而应返回可再生产、可预测的结果。
-
3. Whenever mutable variables are shared between threads, you must use synchronization to ensure that updates made by one thread are visible to other threads on a timely basis.
每当易变的变量在线程间共享时,都必须使用同步来确保一个线程所做的更新,能够及时地被其他线程看到。
- mutable (adj.) late 14c., "liable to change," from Latin mutabilis "changeable," from mutare "to change," from PIE root *mei- (1) "to change, go, move," with derivatives referring to the exchange of goods and services as regulated by custom or law (compare Latin mutuus "done in exchange").
- 请先登录

0 个回复