annotate UnitTests/MessageWithDestination.cpp @ 140:4d863c7b2f44

message queues
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Oct 2012 18:20:04 +0200
parents 3ad78369fcc4
children 24681d35bad9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #include "../Core/IDynamicObject.h"
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
3 #include "../Core/OrthancException.h"
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
4
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
5 #include <memory>
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
6 #include <map>
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 #include <gtest/gtest.h>
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 #include <string>
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
9 #include <boost/thread.hpp>
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
10 #include <boost/date_time/posix_time/posix_time_types.hpp>
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 namespace Orthanc
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 {
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
14 class SharedMessageQueue
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
15 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
16 private:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
17 typedef std::list<IDynamicObject*> Queue;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
18
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
19 unsigned int maxSize_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
20 Queue queue_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
21 boost::mutex mutex_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
22 boost::condition_variable elementAvailable_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
23
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
24 public:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
25 SharedMessageQueue(unsigned int maxSize = 0)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
26 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
27 maxSize_ = maxSize;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
28 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
29
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
30 ~SharedMessageQueue()
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
31 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
32 for (Queue::iterator it = queue_.begin(); it != queue_.end(); it++)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
33 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
34 delete *it;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
35 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
36 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
37
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
38 void Enqueue(IDynamicObject* message)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
39 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
40 boost::mutex::scoped_lock lock(mutex_);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
41
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
42 if (maxSize_ != 0 && queue_.size() > maxSize_)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
43 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
44 // Too many elements in the queue: First remove the oldest
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
45 delete queue_.front();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
46 queue_.pop_front();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
47 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
48
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
49 queue_.push_back(message);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
50 elementAvailable_.notify_one();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
51 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
52
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
53 IDynamicObject* Dequeue(int32_t timeout)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
54 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
55 boost::mutex::scoped_lock lock(mutex_);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
56
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
57 // Wait for a message to arrive in the FIFO queue
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
58 while (queue_.empty())
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
59 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
60 if (timeout == 0)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
61 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
62 elementAvailable_.wait(lock);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
63 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
64 else
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
65 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
66 bool success = elementAvailable_.timed_wait
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
67 (lock, boost::posix_time::milliseconds(timeout));
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
68 if (!success)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
69 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
70 throw OrthancException(ErrorCode_Timeout);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
71 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
72 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
73 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
74
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
75 std::auto_ptr<IDynamicObject> message(queue_.front());
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
76 queue_.pop_front();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
77
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
78 return message.release();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
79 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
80
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
81 IDynamicObject* Dequeue()
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
82 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
83 return Dequeue(0);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
84 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
85 };
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
86
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
87
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 /**
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 * This class represents a message that is to be sent to some destination.
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 **/
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
91 class MessageToDispatch : public boost::noncopyable
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 {
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 private:
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 IDynamicObject* message_;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 std::string destination_;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 public:
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 /**
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 * Create a new message with a destination.
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 * \param message The content of the message (takes the ownership)
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 * \param destination The destination of the message
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 **/
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
103 MessageToDispatch(IDynamicObject* message,
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
104 const char* destination)
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 {
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 message_ = message;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 destination_ = destination;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 }
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
110 ~MessageToDispatch()
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 {
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 if (message_)
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 {
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 delete message_;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 }
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 }
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 };
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
118
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
119
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
120 class IDestinationContext : public IDynamicObject
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
121 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
122 public:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
123 virtual void Handle(const IDynamicObject& message) = 0;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
124 };
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
125
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
126
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
127 class IDestinationContextFactory : public IDynamicObject
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
128 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
129 public:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
130 virtual IDestinationContext* Construct(const char* destination) = 0;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
131 };
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
132
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
133
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
134 class MessageDispatcher
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
135 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
136 private:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
137 typedef std::map<std::string, IDestinationContext*> ActiveContexts;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
138
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
139 std::auto_ptr<IDestinationContextFactory> factory_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
140 ActiveContexts activeContexts_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
141 SharedMessageQueue queue_;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
142
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
143 public:
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
144 MessageDispatcher(IDestinationContextFactory* factory) // takes the ownership
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
145 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
146 factory_.reset(factory);
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
147 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
148
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
149 ~MessageDispatcher()
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
150 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
151 for (ActiveContexts::iterator it = activeContexts_.begin();
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
152 it != activeContexts_.end(); it++)
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
153 {
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
154 delete it->second;
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
155 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
156 }
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
157 };
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 }
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 #include "../Core/DicomFormat/DicomString.h"
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 using namespace Orthanc;
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
166 TEST(MessageToDispatch, A)
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 {
140
4d863c7b2f44 message queues
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
168 MessageToDispatch a(new DicomString("coucou"), "pukkaj");
139
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 }
3ad78369fcc4 start threaded messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170