473,508 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

waiting on function

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

Feb 9 '06 #1
2 1154
sam <sa****@3rddim.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 9 '06 #2
sam
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.

Feb 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2584
by: Bart van Deenen | last post by:
Hi All I'm happily creating an Ajaxified web-app. I use Prototype for encapsulating xml http requests, with method "post". On the backend, I use PHP, and the replies are eval'd by Javascript. I...
3
13419
by: MarkR | last post by:
Hello: I would like to know the best way to spend idle cycles while waiting for a thread to complete. I've seen numerous conversations on this group about how unnatural Application.DoEvents()...
2
2488
by: Adrian | last post by:
hi I make the following call xmlResponse = xws.SubmitXml(Text, xmlRequest.DocumentElement, xmlFilter.DocumentElement) It returns what I want but I would like to do a "do while loop" while I...
2
3779
by: Grant Merwitz | last post by:
Hi I have a form that submits to a web service. As this takes time, i would like to show the user a loading message while its loading. I am using XmlHttp to do the request How can i show this...
5
4420
by: Hansen | last post by:
Hi! I have a problem with an object not yet being initialized when I try to access it. Hence I would like to wait for the object to be initialized. I have the following code: try {...
2
2009
by: ext237 | last post by:
hello. I'm trying to halt a function's execution while waiting for user interaction. For example, I have a function called getUserValue() that pops up a hidden div containing several buttons....
6
5788
by: Lars Uffmann | last post by:
In an event routine, I want to end a certain thread. I am setting a flag that is checked by the thread and causes it to end, when it is set. Then the thread sets a "response" flag, just before...
13
4988
by: mike3 | last post by:
Hi. Busy-waiting is a known anti-pattern that should be avoided. However, in C, there is no standard alternative, so when a wait is required and it's not busy, the program becomes 100%...
1
2755
by: Simon_21 | last post by:
Hi All, I have a servlet which is invoked from a jsp page. While the serlvet is executing, the jsp page is waiting for the servlet to complete. When the servlet completes, it informs the waiting...
1
4069
by: matej | last post by:
(sorry, this is probably slightly offtopic here and would be more appropriate in greasemonkey-users Google Group, but I haven't got any reply there when posted; I guess, it would work exactly the...
0
7129
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7333
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.