Please tell me how to organize it better.

There are two separate tasks simultaneously working. Everyone works in an infinite loop, that is, everyone works constantly.

The question is, how can I better organize a variable where 1 task would write, and the second and UI stream read?

  • Your code in the studio, i.e. Please add to your question. Below the tags is the Edit button. - Bulson
  • Normal ref variable? - Alexander
  • Funny, really simple ref missing. The issue is resolved. - Konstantin

0