waiting on function

  • Thread starter Thread starter sam
  • Start date Start date
S

sam

I have a timer that sends data out a serialport frequently. The call
to Send() on the serial port takes a while, and is making UI slow, and
even making the mouse jump. I've tried some various Threading
scenarios, but even when I call Send on a new thread it ties up the UI.

Thanks for any help,

Sam
 
sam said:
I have a timer that sends data out a serialport frequently. The call
to Send() on the serial port takes a while, and is making UI slow, and
even making the mouse jump. I've tried some various Threading
scenarios, but even when I call Send on a new thread it ties up the UI.

It shouldn't affect the UI if it's on a different thread. How sure are
you that you were really calling Send on a new thread?

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
 
Thanks for the reply, the problem is elswhere though. By looking at
System.Threading.Thread.CurrentThread at various places, I could see
that the functions where being called on a seperate thread.
 
Back
Top