Basically If the temperature is stored in an atomic datatype on your platform like a 32 bit integer you can change this (volatile !) variable and read it without access protection like a mutex because the reader always reads a consistent value.
For instance if you have a structure of data with multiple elements and you want to write to and read from it as a consistent set of data, you have to mutually exclude (using a mutex or by an enclosing criticial section) the access to it because you can’t atomically change all elements at once and a reader could read a mix of outdated and updated elements.
In your specific case why not just read the temperature and send it to the server in 1 task periodically ?
The prio doesn’t really matter since both tasks block for while giving up the CPU allowing other tasks to run.
If you only want to send the temperature every 10s to the server just read and send it every 10 s.
If you use a queue, you don’t need a global variable. Just send the temperature reading to the queue and read them from the other task when needed.
Although if both tasks run with the same periodicity, perhaps you could do both the temperature reading and the tcp send in the same task?