in general , in one aspect , the disclosure describes a method that includes at a first packet processing thread executing at a first core , performing a memory read to data shared between packet processing threads including the first thread . the method also includes at the first packet processing thread , determining whether the data returned by the memory read has been changed by a packet processing thread operating on another core before performing an exclusive operation on the shared data by the first packet processing thread .