473,382 Members | 1,745 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,382 software developers and data experts.

Repeat Events & Background Processing

Hi All,

I working on a system that every few minutes will have to perform an action (perhaps large database query or even dialing into a remote machine). Obviously i want this to be invisable to the user.

Right now i'm using the folowing to peform this - it seems to work but it's not very glamorous, and is only an example - perhaps performance would degrade if it was contacting a machine via modem (SayHellow) is the starting point of a thread).

Public Sub SayHello()
While True
Debug.WriteLine("Active: " & Thread.CurrentThread.Name & " " & Now)
Dim i As Integer
For i = 0 To 1000000
i = i
Next
Thread.Sleep(10000 * 240)
End While
End Sub

But i've been reading up on Thread.Timers - would these be better/less nasty than my exisitng solution?

Andrew

Nov 20 '05 #1
1 985
Yes.
______________________________
The Grim Reaper

"Andrew Olden" <Andrew Ol***@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
Hi All,

I working on a system that every few minutes will have to perform an action (perhaps large database query or even dialing into a remote machine).
Obviously i want this to be invisable to the user.
Right now i'm using the folowing to peform this - it seems to work but it's not very glamorous, and is only an example - perhaps performance would
degrade if it was contacting a machine via modem (SayHellow) is the starting
point of a thread).
Public Sub SayHello()
While True
Debug.WriteLine("Active: " & Thread.CurrentThread.Name & " " & Now) Dim i As Integer
For i = 0 To 1000000
i = i
Next
Thread.Sleep(10000 * 240)
End While
End Sub

But i've been reading up on Thread.Timers - would these be better/less nasty than my exisitng solution?
Andrew

Nov 20 '05 #2

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

Similar topics

1
by: Paul | last post by:
Hello, I am researching ideas for a long term project and am currently investigating Java's capability for processing live video feed. I wish to examine digital video feed in real time and do...
7
by: barry womb | last post by:
Hello- I've created a page and have a table with a no repeating background. Works in all but Opera. Any ideas? Here's the style sheet: ..tdnavbg { background-color: #000000;...
3
by: Naveen Mukkelli | last post by:
Hi, I'm trying to update my GUI when an event is raised in my one of my dlls. my example code is: ------------------- In GUI: someLable.Text = " "; ---
15
by: Bryce K. Nielsen | last post by:
I have an object that starts a thread to do a "process". One of the steps inside this thread launches 12 other threads via a Delegate.BeginInvoke to process. After these 12 threads are launched,...
2
by: gjoneshtfc | last post by:
Hello, I want to create a table with records from a database but I want the background colour of each row to be different. For example: Record 1 - blue background Record 2 - white background...
1
by: nicky77 | last post by:
hi there, i'm pretty inexperienced with CSS, so apologies for the shoddy coding. i'm trying to set a 3 column layout using different background images for each column. however, i have whitespace at...
3
by: jacksoncn | last post by:
Hey everyone, I am havin a problem here, maybe someone could lend me their mind for a second. Here it is: I am using a repeat background on a y axis. When I am testing the file from my...
2
XedinUnknown
by: XedinUnknown | last post by:
Hi! I am new to this forum, but not new to web design and programming. Nevertheless, I have never tried to use PNG so extensively in my pages. here's the problem. First, I have found that the...
4
by: shapper | last post by:
Hello, I am trying to give a background to a Div repeating it on the y direction. Please, notice the alternate of colors: http://www.27lamps.com/Beta/Background/Background.html Does anyone...
0
by: shapper | last post by:
On Sep 25, 1:56 am, shapper <mdmo...@gmail.comwrote: Sherm, Thank you to point that to me. I forgot to hide the gradient on Photoshop and I was all this time going around my CSS. Thank you...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.