Message queue to synchronize and share information between threads. It is a template class, so it can hold elements of different types.

Dependents:   Nucleo_modbus_protocol_test F103RB_tcp_rtu_modbus_copy_v1_0

Files at this revision

API Documentation at this revision

Comitter:
gabrielrivas
Date:
Mon Jan 19 08:09:02 2015 +0000
Parent:
1:c5b6cfae502d
Commit message:
Documentation added.

Changed in this revision

MessageQueue.h Show annotated file Show diff for this revision Revisions of this file
diff -r c5b6cfae502d -r 5e151e3834db MessageQueue.h
--- a/MessageQueue.h	Mon Jan 19 06:56:21 2015 +0000
+++ b/MessageQueue.h	Mon Jan 19 08:09:02 2015 +0000
@@ -1,4 +1,4 @@
-/* Message Queue Library
+/** Message Queue Library
  * Copyright (c) 2015 Gabriel Rivas
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -141,7 +141,7 @@
 template <class T>
 T MessageQueue<T>::read()
 {
-    T data;
+    T data = 0;
 
     m_mutex.lock();