473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how is access to the UI thread handled in C#.

and also if you can help me to know why is the UI thread treated differently from other threads?

Thanks

Tony
Aug 21 '09 #1
1 1678
tlhintoq
3,525 Expert 2GB
Users expect the UI of a program to be responsive. It shouldn't get stalled or slow to respond while other things are happening.

For example:

If you are reading through 10,000 text files instead of 10 files, you expect to the [CANCEL] button to work now, not at the end of the 10,000 files.

So you need the UI to be on its own thread. When the cancel button is hit it should raise an event that your other threads look for that will cause them each to end whatever they are doing.
Aug 21 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

31
by: AlexeiOst | last post by:
Everywhere in documentation there are recommendations to use threads from thread pooling for relatively short tasks. As I understand, fetching a page or multiple pages (sometimes up to 50 but not...
3
by: Nigel C | last post by:
I have been tasked with converting a legacy Access 2 system to Access 2000. This in itself is not the issue. I have a copy of the Program, Data and SYSTEM.MDA file used by the client. However, I...
3
by: karl | last post by:
I have a windows service that creates a monitor thread which in turn creates 4 worker threads. Each thread is based upon a derived class (HL7Listener) of the TcpListener class. When running this...
20
by: Doug Thews | last post by:
I ran into an interesting re-pain delay after calling the Abort() method on a thread, but it only happens the very first time I call it. Every time afterward, there is no delay. I've got a...
2
by: c676228 | last post by:
Hi, I created a group of user controls in an aspx form. which is as follow: <body> <form id="Form1" method="post" runat="server"> <SUBWAY:PEOPLEINFO id="Peopleinfo0" runat="server"...
4
by: sklett | last post by:
I'm fairly new to Threading and things have been going pretty smooth so far. I did some performance testing on my new app and realized it's lagging a bit on raising events. It's a realtime app and...
13
by: kolmogolov | last post by:
/* Hi, I have removed things irrelevant to reproducing the problem. What's wrong with my code? Thanks in advance for any hint! 1166425362 */ #include <stdio.h> #include <stdlib.h> #include...
0
by: Cindy Huyser | last post by:
I have an Access 2000 database behind a threaded Java application that that can have have concurrent access to the same table (but not the same record). The database is set up for shared access...
4
by: Smithers | last post by:
Does the FileSystemWatcher class, when enabled, spawn a new thread for itself? I googled and somehow just found people having random problems with the FileSystemWatcher class and the MSDN docs....
8
by: Gerhard Fiedler | last post by:
Hello, I'm not sure whether this is a problem or not, or how to determine whether it is one. Say memory access (read and write) happens in 64-bit chunks, and I'm looking at 32-bit variables....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.