Is the absolute version of FloatBuffer.put thread-safe?

143 Views Asked by At

There are multiple put methods for java.nio.FloatBuffer. As far as I know, most (all?) of them depend on an internal state of the buffer, so they are not thread-safe. My question is if this also applies for the following method?

public abstract FloatBuffer put(int index, float f)

The documentation says:

Absolute put method (optional operation).

Writes the given float into this buffer at the given index.

In my case at hand it would be no problem if an update is lost/overwritten from time to time, but it would be fatal if a write happened on a completely different index (because the internal position is overwritten before the value is put or something like that).

0

There are 0 best solutions below