summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--raul/List.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/raul/List.h b/raul/List.h
index 4d12a63..55959a1 100644
--- a/raul/List.h
+++ b/raul/List.h
@@ -76,7 +76,12 @@ public:
void push_back(T& elem); // NOT realtime safe
void clear();
- size_t size() const { return _size; }
+
+ /// Valid only in the write thread
+ unsigned size() const { return (unsigned)_size.get(); }
+
+ /// Valid for any thread
+ bool empty() { return (_head.get() != NULL); }
class iterator;