CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Posts
    613

    multithreading communication

    Is sending\posting messages the preferred way to communicating between threads ? I've read about using events and global variables but not convinced thats a good option.

    What if it's a worker thread that has no message pump ?

    Im very keen to learn more about multithreading so any article\ tutorial anyone can recommend is more than welcome.

  2. #2
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    [Moved thread]
    Ciao, Andreas

    "Software is like sex, it's better when it's free." - Linus Torvalds


    Article(s): Allocators (STL) Function Objects (STL)

  3. #3
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    Well...like usual it kind of depends on what you are trying to do...

    Take a look at the following...
    Ciao, Andreas

    "Software is like sex, it's better when it's free." - Linus Torvalds


    Article(s): Allocators (STL) Function Objects (STL)

  4. #4
    Join Date
    Jan 2003
    Posts
    613
    Didnt know there was a multithreading forum.

    Thanks for the link but I'm at the moment developing in mfc.

    My question was suppose to be a general question about multithreading.

    Is messages the preferred way to execute a method in another thread ? How can I find out that state of a thread ?

    Another thing, need advice on a design matter. Im developing a program that needs to receive small datapackages about 8-12 every second and then process the received data. I've made a class that derives of CAsyncSocket to receive the data. Would it make much of difference speed wise to have the receive object run in the primary thread or create a separate thread for the receiving object.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts



HTML5 Development Center

Click Here to Expand Forum to Full Width