put a lock on sending so we do not run into race conditions with the encoder
put a lock on sending so we do not run into race conditions with the encoder

gtfierro/cs262-project,gtfierro/cs262-project,gtfierro/cs262-project