blob: 64f9f0806decc73afd4c10189aabef6e7a7eb3d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
// $Id$
#include "ProxySupplier.h"
ACE_INLINE TAO_SYNCH_MUTEX*
TAO_Notify_Consumer::proxy_lock (void)
{
return &this->proxy_->lock_;
}
ACE_INLINE TAO_Notify_ProxySupplier*
TAO_Notify_Consumer::proxy_supplier (void)
{
return this->proxy_;
}
ACE_INLINE CORBA::Boolean
TAO_Notify_Consumer::is_suspended (void)
{
return this->is_suspended_;
}
ACE_INLINE void
TAO_Notify_Consumer::suspend (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
{
this->is_suspended_ = 1;
}
ACE_INLINE void
TAO_Notify_Consumer::push (const TAO_Notify_Event* event ACE_ENV_ARG_DECL)
{
if (this->is_suspended_ == 1) // If we're suspended, queue for later delivery.
{
ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, *this->proxy_lock ());
const TAO_Notify_Event* event_copy = event->copy_on_heap (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
TAO_Notify_Event_Copy_var event_var (event_copy);
this->event_collection_->enqueue_head (event_var);
return;
}
ACE_TRY
{
this->push_i (event ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCH (CORBA::OBJECT_NOT_EXIST, not_exist)
{
this->handle_dispatch_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCH (CORBA::SystemException, sysex)
{
this->handle_dispatch_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
{
}
ACE_ENDTRY;
}
|