If you use tee with append (-a) mode, then there's no risk of data loss, with the exception of filesystems that don't have an append operation (e.g., NFS). In append mode, tee opens the file with the O_APPEND flag.
$ echo 1 | strace tee -a /tmp/file 2>&1 | grep open | grep /tmp/file
openat(AT_FDCWD, "/tmp/file", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3
From man 2 openat:
O_APPEND
The file is opened in append mode. Before each write(2), the
file offset is positioned at the end of the file, as if with
lseek(2). The modification of the file offset and the write
operation are performed as a single atomic step.
The key sentence there is The modification of the file offset and the write operation are performed as a single atomic step. Every call to write() from whichever instance of tee is guaranteed to atomically position the file offset to the end of the file, then write the data.
The openat man page does note that this pattern of use is not safe on NFS filesystems (as I mentioned earlier):
O_APPEND may lead to corrupted files on NFS filesystems if more
than one process appends data to a file at once. This is be‐
cause NFS does not support appending to a file, so the client
kernel has to simulate it, which can't be done without a race
condition.
-a) option oftee, but this will not guarantee that the outputs will not be garbled (=not intermixed) in the output file.-aoption in the question. i have edited the question now, please check edit.{ cmd1 & cmd2 & cmd3 & } | tee /tmp/file. I think that this version will never lose data..