Designing multiple threads

Hi,

I'm trying to build an application which keeps sending messages to a server as user inputs some values. The application should also recieve messages from the server and update the interface. These processes should continue until the user wishes to quits.

I'm not sure about how many threads I should create and how to handle them. Can anyone please advise me on this regard

Thank you so much



Answer this question

Designing multiple threads

  • C Senthil Kumar

    Windows CE 5.0 and previous supports 32 simultaneous processes maximum (32Mb Virtual mem x process). Altought you can create as many threads only limited by RAM memory.

    About how to use them, take a look at this MEDC2006 HandOnLab.

    regards



  • Jeff Green

    Daffodils wrote:

    Hi,

    I'm trying to build an application which keeps sending messages to a server as user inputs some values. The application should also recieve messages from the server and update the interface. These processes should continue until the user wishes to quits.

    I'm not sure about how many threads I should create and how to handle them. Can anyone please advise me on this regard

    Thank you so much

    how are you sending messages to what sort of server

    socket based communication sql

    at a minimum you'd probably need three threads -- one for the user input, one for sending msgs, one for receiving ... but that's a guess, as my knowledge of your app and config are limited.


  • LeeC22

    Daffodils wrote:

    Hi Andrew,

    I'm using Asynchronous socket communication between client and server.

    Thanks

    then yeah, probably just three, unless you're expecting multiple, simultaneous messages in a single direction, in which case make sure you spawn a thread in response to each request, in addition to the server thread(s) monitoring the port(s).


  • nhaas

    Hi Andrew,

    I'm using Asynchronous socket communication between client and server.

    Thanks


  • Designing multiple threads