473,665 Members | 2,740 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

background threads pause on app focus lost

I have a background thread running in my application. When my
application loses focus there is a 200 to 500ms delay in the execution
of my background thread. Is this normal? Setting the process and
thread priorities to "above normal" makes it a little better but there
is still a long delay. Any other way around this issue? I'm running on
winXP with .Net 3.5 sp1.
Aug 13 '08 #1
1 1835
On Wed, 13 Aug 2008 14:07:34 -0700, not_a_commie <no********@gma il.com>
wrote:
I have a background thread running in my application. When my
application loses focus there is a 200 to 500ms delay in the execution
of my background thread. Is this normal?
It really depends on what else is going on. What are the background
threads doing? Does your application do anything else when it loses
focus? How do you make it lose focus? What application gets the
foreground, and what is it doing?

I'd say that a 200-500ms delay wouldn't be typical just as a result of an
application losing focus. But there certainly are reasons why that
_might_ happen to an application.

Pete
Aug 13 '08 #2

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

Similar topics

0
1015
by: Randall Smith | last post by:
I was doing some testing with Python threads and found that when I try to create 300 threads one immediately after another, the 255th thread can't be created. The error message I get is: thread.error: can't start new thread When I put a pause between the creation of each thread of .1 second, I have the same problem. If I pause .2 seconds between creation of threads, no more problem.
0
1902
by: raj | last post by:
Hi, The focus in the datagrid is not lost even after leaving the datagrid. The selected cell is highlighted even when the focus from the datagrid is lost. This happens only after the .NET Framework 1.1 SP 1 installation. While using the .NET Framework version 1.1.4322.573, the selected cell is not highlighted when the focus from the datagrid is lost. But, while using the .NET Framework version 1.1.4322.2032, even after the focus is...
11
3190
by: Konrad Den Ende | last post by:
I have a function returning a string but the problem is that the color of it is blue which suits me well for some pages but not for others. Is it possible to "feel" what the color of the background in the current document is and set the color of the output accordingly? The background will be an image, in most cases. -- Kindly Konrad
3
2915
by: jdph40 | last post by:
In Access 2002, I designed a simple database for our Safety department to enter results of a survey. There are 41 true/false statements. I have a main form called frmSurvey with a subform called sbfrmAnswers. I put an option group (optAnswers) on the subform with buttons for true or false. To speed entry of the results of the 350+ surveys we've collected, I put the following code in the AfterUpdate event of the option group: With...
21
1624
by: Doug Thews | last post by:
I was noticing that when I run a multi-threaded app from within the IDE and then I close the main form (which spun off all of the threads), that the Stop/Pause VCR buttons in the debugger are still available & working. It's like closing the form did not actually cancel the threads. From my earlier discussions on the newsgroup, I know how people already feel about Thread.Abort(), so I was wondering what I need to do to "clean up" when...
0
1711
by: Nick | last post by:
I have a situation wherein i have a text box, that has abc() being executed whenever the lost focus event is triggered. However, there is an exceptional case where, if a button click causes the lost focus, I do not want abc() to be called. Is there a method by which one can find out which control is triggering the lost focus event? I have a keyboard shortcut for the click handle, and the lost focus handle does not get invoked if I use...
6
1680
by: Sardonic | last post by:
I have created a program with a gui that uses threads to accomplish it's task, what I was wondering was is how the 'pause' effect can be accomplished in python? so here's what I want to accomplish: They push the pause button, and all threads stop what they're doing. The threads also should be able to resume upon the user's request.
1
4751
by: ravikumar2007 | last post by:
I am working with .NET 3.5 framework within an WPF application. I have a windows application where for a textbox, I have defined the lost focus event. I need to call the Focus() method of any other control in a scenario where the first textbox's lost focus is being called automatically since we are moving out of the control. Is there any way to call Focus() method without calling the lost focus event handler for this textbox? I have tried...
8
36878
by: Marco Pais | last post by:
Hi there. How can I change the background color of a textbox when it gets the focus? I can handle the "Enter" event and do this private void txtDummie_Enter(object sender, EventArgs e) { txtDummie.BackColor=Color.Red; }
0
8348
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8863
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8779
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8636
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7376
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5660
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2765
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 we have to send another system
2
1761
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.