MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / valid

Method valid

concurrentqueue.h:706–706  ·  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

704 // that the token is valid for use with a specific queue,
705 // but not which one; that's up to the user to track.
706 inline bool valid() const { return producer != nullptr; }
707
708 ~ProducerToken()
709 {

Callers 1

token_moveMethod · 0.80

Calls

no outgoing calls

Tested by 1

token_moveMethod · 0.64