MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / valid

Method valid

include/dmlc/concurrentqueue.h:616–616  ·  view source on GitHub ↗

A token is always valid unless: 1) Memory allocation failed during construction 2) It was moved via the move constructor (Note: assignment does a swap, leaving both potentially valid) 3) The associated queue was destroyed Note that if valid() returns true, that only indicates that the token is valid for use with a specific queue, but not which one; that's up to the user to track.

Source from the content-addressed store, hash-verified

614 // that the token is valid for use with a specific queue,
615 // but not which one; that's up to the user to track.
616 inline bool valid() const { return producer != nullptr; }
617
618 ~ProducerToken()
619 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected