Hello everyone,
Can anyone provide me some idea on how to replace the Sleep method.
Major Disadvantage that I face with the Sleep method is that the
application freezes and does not respond to any other events.
I am looking for somedata on how to use Waitable Timer APIs with VB.NET
Thanks in Advance. 8 4210
>Can anyone provide me some idea on how to replace the Sleep method.
It would be easier to suggest a replacement if you tell us why are you
sleeping/waiting to begin with?
Mattias
--
Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Hello Mattias,
The reason why the application needs to respond to events during sleep
is because the application interacts with more than one Hardware unit.
And sleep is necessary because there is a delay between when the
application request for data and when the actual data is received back
from the hardware.
Please refer to the following newsgroup question for more details about
Waitable Timer class of VB. http://groups.google.com/group/micro...963709a1ee9f8e
Please let me know if you need further information.
Thanks for offering help.
And the API for accessing this "hardware" doesn't have events or
asynchronous call support ? Would be a bit strange for something that must
wait before responding...
--
Patrice
"Sam" <in************ **@yahoo.com> a écrit dans le message de news: 11************* ********@i39g20 00...legro ups.com... Hello Mattias,
The reason why the application needs to respond to events during sleep is because the application interacts with more than one Hardware unit. And sleep is necessary because there is a delay between when the application request for data and when the actual data is received back from the hardware.
Please refer to the following newsgroup question for more details about Waitable Timer class of VB. http://groups.google.com/group/micro...963709a1ee9f8e
Please let me know if you need further information.
Thanks for offering help.
Hello Patrice,
Even though the hardware's API supports events, the software doesnot
give access to the application to respond to the event. I have been
using Application.DoE vents() to give control to the event to occur.
Sometimes it works, other times it doesnt.
Thanks.
Hello Patrice,
Even though the hardware's API supports events, the software doesnot
give access to the application to respond to the event. I have been
using Application.DoE vents() to give control to the event to occur.
Sometimes it works, other times it doesnt.
Thanks.
Hello Patrice,
Even though the hardware's API supports events, the software doesnot
give access to the application to respond to the event. I have been
using Application.DoE vents() to give control to the event to occur.
Sometimes it works, other times it doesnt.
Hello Patrice,
Even though the hardware's API supports events, the software doesnot
give access to the application to respond to the event. I have been
using Application.DoE vents() to give control to the event to occur.
Sometimes it works, other times it doesnt.
You could perhaps launch this on another thread. This way this is not your
UI thread that would sleep.
A bit hard to help as I don't know about this hardware (what is this ?). Do
you have some way of knowing for sure that data are available ? The hardware
vendor doesn't have code samples ?
Good luck.
--
Patrice
"Sam" <in************ **@yahoo.com> a écrit dans le message de news: 11************* *********@t31g2 00...legr oups.com... Hello Patrice, Even though the hardware's API supports events, the software doesnot give access to the application to respond to the event. I have been using Application.DoE vents() to give control to the event to occur. Sometimes it works, other times it doesnt.
Thanks. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jane Austine |
last post by:
As far as I know python's threading module models after Java's.
However, I can't find something equivalent to Java's interrupt and
isInterrupted methods, along with InterruptedException.
"somethread.interrupt()" will wake somethread up when it's in
sleeping/waiting state.
Is there any way of doing this with python's thread? I suppose thread...
|
by: Jerry Sievers |
last post by:
Greetings Pythonists;
I have limited experience with threaded apps and plenty with old style
forked heavyweight multi-processing apps.
Using Python 2.3.3 on a Redhat 7.x machine.
Wondering if there is a simple way from a main python program to kill
a running thread? I see with the 'threading' module the way daemonic
threads behave...
|
by: Jurgen Oerlemans |
last post by:
Hello
I have a program for which I want to see from a distance if it has been
started.
I made a timer which is enabled when the program is started.
Code in the timer:
Label_Again:
txtWaitRun.Text = "R"
Threading.Thread.Sleep(300)
|
by: Mark |
last post by:
Hi,
Normally in what kind of situation system will abort a thread created
manually ? And how do I know the thread is aborted by system after I start
it?
Thanks!
Mark
|
by: John |
last post by:
Hi
Is there a way to e-mail using outlook2002 from within vb.net without
getting the nasty "An application is trying to access you outlook..."
message?
Thanks
Regards
| |
by: Peter Proost |
last post by:
Hi I got this piece of c# code which runs ok but now I translated it to
vb.net (see bottom of post for both pieces)
and it keeps erroring out at pi.SetValue(testForm, newValue, x)
with this error:
System.Reflection.TargetParameterCountException: Parameter count mismatch.
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,...
|
by: OlafMeding |
last post by:
Below are 2 files that isolate the problem. Note, both programs hang
(stop responding) with hyper-threading turned on (a BIOS setting), but
work as expected with hyper-threading turned off.
Note, the Windows task manager shows 2 CPUs on the Performance tab with
hyper-threading is turned on.
Both Python 2.3.5 and 2.4.3 (downloaded from...
|
by: tdahsu |
last post by:
All,
I'd appreciate any help. I've got a list of files in a directory, and
I'd like to iterate through that list and process each one. Rather
than do that serially, I was thinking I should start five threads and
process five files at a time.
Is this a good idea? I picked the number five at random... I was
thinking that I might check...
|
by: George Sakkis |
last post by:
I'm baffled with a situation that involves:
1) an instance of some class that defines __del__,
2) a thread which is created, started and referenced by that instance,
and
3) a weakref proxy to the instance that is passed to the thread
instead of 'self', to prevent a cyclic reference.
This probably sounds like gibberish so here's a...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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. ...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |