C# threads - Posting messages between threads

Posted by Harsha on Stack Overflow See other posts from Stack Overflow or by Harsha
Published on 2010-05-26T04:30:37Z Indexed on 2010/05/26 4:41 UTC
Read the original article Hit count: 476

Filed under:
|
|

Hi All,

I am working on a project which involves reusing as well as migrating some of the existing MFC code to C#.

The current code in MFC, creates some threads and uses ::PostthreadeMessage() and ON_THREAD_MESSAGE(msg,func) for inter thread asynchronous communication through messages.

::PostthreadeMessage() -> sends a message to a particular thread id. ON_THREAD_MESSAGE(msg,func) -> calls the function(func) when a message(msg) is received.

Since i am not much aware of the threading interfaces in C#, i tried to search for similar API's in C#, but was not able to find any.

It would be great, if somebody can help me in finding the appropriate functions for this purpose in C#

Thanks, Harsha

© Stack Overflow or respective owner

Related posts about c#

Related posts about multithreading