repace setValueFromThread by set via a tamporary cot