EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Is Messenger.MessageProcessed thread safe?

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#9229
Posted: 03/11/2009 16:08:01
by Alexandr Gavriluk (Basic support level)
Joined: 03/11/2009
Posts: 3

Can I call this method Messenger.MessageProcessed from another threads?

It is need some synchronization tools such of critical section to call this method?
#9234
Posted: 03/12/2009 02:21:35
by Eugene Mayevski (EldoS Corp.)

You need to call MessageProcessed() only after the call to GetMessage(). It is generally safe to call MessageProcessed() in a different thread.


Sincerely yours
Eugene Mayevski
#9239
Posted: 03/12/2009 07:23:00
by Alexandr Gavriluk (Basic support level)
Joined: 03/11/2009
Posts: 3

>>You need to call MessageProcessed() only after the call to GetMessage().

Yes, I know this. And PeekMessage :) This is written in documentation.

>>It is generally safe to call MessageProcessed() in a different thread.

Thank you. I try to build multithreaded environment under one Messenger - server (with HTTP transport).

As I understand, massage Handled to Query in one thread and proceed sequentially? No multithreading in standard use?
#9241
Posted: 03/12/2009 10:15:53
by Eugene Mayevski (EldoS Corp.)

I am not sure that I understand your question.


Sincerely yours
Eugene Mayevski
#9242
Posted: 03/12/2009 11:02:58
by Alexandr Gavriluk (Basic support level)
Joined: 03/11/2009
Posts: 3

Quote
Eugene Mayevski wrote:
I am not sure that I understand your question.


Messages, accepted from concrete TMCMessenger, is handled by TMCQueue in same thread in which created this TMCMessenger?
#9243
Posted: 03/12/2009 11:19:56
by Eugene Mayevski (EldoS Corp.)

The messages are dispatched to the queues when you call DispatchMessages() or other methods of TMCMessenger object in the thread in which you call those methods.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

Topic viewed 3740 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!