Hacker News new | ask | show | jobs
by tcbawo 3478 days ago
Another approach gives each element a 'data ready' flag (ie the real element type inherits from T). This flag is set by a producer and cleared by the consumer. This would give you an empty/full indication.