version 1.15, 2002/01/18 19:27:48
|
version 1.16, 2002/02/02 01:03:31
|
|
|
private: | private: |
Semaphore _client_sem; | Semaphore _client_sem; |
Mutex _mut; | Mutex _mut; |
// unlocked_dq<Message> _request; |
unlocked_dq<Message> _request; |
// unlocked_dq<Message> _response; |
unlocked_dq<Message> _response; |
Message *_request; |
// Message *_request; |
Message *_response; |
// Message *_response; |
| |
OperationContext _operation_list; | OperationContext _operation_list; |
Uint32 _state; | Uint32 _state; |
|
|
return _operation_list; | return _operation_list; |
} | } |
| |
|
|
inline void AsyncOpNode::put_request(const Message *request) | inline void AsyncOpNode::put_request(const Message *request) |
{ | { |
_mut.lock(pegasus_thread_self()); | _mut.lock(pegasus_thread_self()); |
gettimeofday(&_updated, NULL); | gettimeofday(&_updated, NULL); |
// if( false == _request.exists(reinterpret_cast<void *>(const_cast<Message *>(request))) ) | // if( false == _request.exists(reinterpret_cast<void *>(const_cast<Message *>(request))) ) |
// _request.insert_last( const_cast<Message *>(request) ) ; |
_request.insert_last( const_cast<Message *>(request) ) ; |
| |
_request = const_cast<Message *>(request); |
// _request = const_cast<Message *>(request); |
| |
_mut.unlock(); | _mut.unlock(); |
} | } |
|
|
Message *ret; | Message *ret; |
_mut.lock(pegasus_thread_self()); | _mut.lock(pegasus_thread_self()); |
gettimeofday(&_updated, NULL); | gettimeofday(&_updated, NULL); |
// ret = _request.remove_first() ; |
ret = _request.remove_first() ; |
ret = _request; |
// ret = _request; |
| |
_mut.unlock(); | _mut.unlock(); |
return ret; | return ret; |
|
|
_mut.lock(pegasus_thread_self()); | _mut.lock(pegasus_thread_self()); |
gettimeofday(&_updated, NULL); | gettimeofday(&_updated, NULL); |
// if (false == _response.exists(reinterpret_cast<void *>(const_cast<Message *>(response)))) | // if (false == _response.exists(reinterpret_cast<void *>(const_cast<Message *>(response)))) |
// _response.insert_last( const_cast<Message *>(response) ); |
_response.insert_last( const_cast<Message *>(response) ); |
| |
_response = const_cast<Message *>(response); |
// _response = const_cast<Message *>(response); |
| |
_mut.unlock(); | _mut.unlock(); |
} | } |
|
|
| |
_mut.lock(pegasus_thread_self()); | _mut.lock(pegasus_thread_self()); |
// gettimeofday(&_updated, NULL); | // gettimeofday(&_updated, NULL); |
// ret = _response.remove_first(); |
ret = _response.remove_first(); |
ret = _response; |
// ret = _response; |
| |
_mut.unlock(); | _mut.unlock(); |
return ret; | return ret; |