473,320 Members | 1,978 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.

HOWTO: properly call methods asynchronously???

I have a component I'm using in my application. When I call a method
myComponent.slowMethod() my entire application hangs until slowMethod()
completes. I have tried using the .net threading model to trigger the
slowMethod inside a thread wrapper class but I still have the same behavior.
Is there anything I might be missing here?

Thanks for any help,
Alex
Jul 21 '05 #1
1 1196
CMM
Is it a control? Controls are not thread safe. Use BeginInvoke() to call
(actually queue) the method indirectly. If you're the author of the code in
the slowMethod, you can put Application.DoEvents() throughout the
slowMethod's code to ensure that it doesn't block the UI message pump....
there might be some consequences with using Application.DoEvents depending on
what you're doing in the code- but I've never had a problem.

"Alex Glass" wrote:
I have a component I'm using in my application. When I call a method
myComponent.slowMethod() my entire application hangs until slowMethod()
completes. I have tried using the .net threading model to trigger the
slowMethod inside a thread wrapper class but I still have the same behavior.
Is there anything I might be missing here?

Thanks for any help,
Alex

Jul 21 '05 #2

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

Similar topics

2
by: Julia | last post by:
Hi, I am using Asynchronously Delegates,and I wonder Can I call EndInvoke to end the processing before THE Asynchronously action ended? Thanks.
4
by: ATS | last post by:
HOWTO: Add methods to C++ UserControl. Please help, I want to add a method to a C++ .NET UserControl that is based off the sample in the MSND article titled: How to automate Internet...
6
by: Don Wash | last post by:
Hi All! I'm developing ASP.NET pages using VB.NET language. My background is VB6 and ASP3. Right now, I'm evaluating strategies on creating reusable and common functions and methods for ASP.NET....
4
by: Ray Dukes | last post by:
What I am looking to do is map the implementation of interface properties and functions to an inherited method of the base class. Please see below. ...
1
by: Alex Glass | last post by:
I have a component I'm using in my application. When I call a method myComponent.slowMethod() my entire application hangs until slowMethod() completes. I have tried using the .net threading model...
5
by: Stephen Barrett | last post by:
I have read many threads related to async fire and forget type calls, but none have addressed my particular problem. I have a webpage that instantiates a BL object and makes a method call. The...
3
by: Sidanalism | last post by:
I miss the old way when asynchronous calls are driven my window messages. Yes a thread pool might greatly improve application performance but there are time I don't want my event to be fire in a...
1
by: kkao77 | last post by:
Someone help me please. I've tried to write an asynchronous method, but it didn't call my web service, do I need to do something in my webservice project to make it work? or if there is...
6
by: HolyShea | last post by:
All, Not sure if this is possible or not - I've created a class which performs an asynchronous operation and provides notification when the operation is complete. I'd like the notification to be...
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...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: 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
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
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.