Is writing to an array of floats from 2 different threads at two different indexes safe?

Viewed 693
float myfloats[2];

// thread A:
myFloats[0] = 1.0;

// thread B:
myFloats[1] = 1.0;

Assuming that thread A will always access index 0, thread B index 1. Is this safe or can the array get corrupted?

1 Answers
Related