For lua, let mg.read() read only if the data is there.