esp8266ndn
NDN Arduino library for ESP8266 and more
Loading...
Searching...
No Matches
null.hpp
Go to the documentation of this file.
1#ifndef NDNPH_PORT_QUEUE_NULL_HPP
2#define NDNPH_PORT_QUEUE_NULL_HPP
3
4#include "../../core/common.hpp"
5
6namespace ndnph {
7namespace port_queue_null {
8
10template<typename T, size_t capacity>
11class SafeQueue {
12public:
13 using Item = T;
14
15 bool push(Item) {
16 return false;
17 }
18
19 std::tuple<Item, bool> pop() {
20 return std::make_tuple(T(), false);
21 }
22};
23
24} // namespace port_queue_null
25
26#ifdef NDNPH_PORT_QUEUE_NULL
27namespace port {
28template<typename T, size_t capacity>
29using SafeQueue = port_queue_null::SafeQueue<T, capacity>;
30} // namespace port
31#endif
32
33} // namespace ndnph
34
35#endif // NDNPH_PORT_QUEUE_NULL_HPP
Generic thread-safe queue stub.
Definition null.hpp:11
bool push(Item)
Definition null.hpp:15
T Item
Definition null.hpp:13
std::tuple< Item, bool > pop()
Definition null.hpp:19
Definition fs.hpp:33