Re[6]: Interlocked
От:
vorona
Дата:
29.12.18 23:18
Оценка:
Здравствуйте, RAza, Вы писали:
RA>Речь про вот этот участок кода:
RA>
RA>
var
current = holder; RA>
if
(current !=
null
) RA>
return
current.Value; RA>
It’s important to use the handler local variable, as if instead you access the field twice, it’s possible that the last subscriber will unsubscribe between the check and the invocation:
Переместить
Удалить
Выделить ветку
Проголосовать
Пока на собственное сообщение не было ответов, его можно удалить.
Удалить
Проголосовать
Заголовок: