473,748 Members | 10,569 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what is an asynchronous event?

Hi All,

When we say events are processed asynchronously in for instance Sharepoint
,what dose it mean?

Thanks for your help.
Ali

Nov 16 '05
13 4397
Thanks Bruce,Like always your answers are informative.

Ali-R
"Bruce Wood" <br*******@cana da.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
I don't know about the particular routines you're calling, but usually
a synchronous invocation does not involve event handlers at all: you
call a method, it waits until some operation completes, then it returns
to you.

Of course, there may be an asynchronous invocation going on under the
covers. Some "synchronou s" method invocations are nothing more than
methods that send an event and don't return until the corresponding
reply event comes back. However, from the point of view of the caller,
a synchronous invocation doesn't need an event handler because you know
when the operation is done: when the method returns.

Nov 16 '05 #11
Thanks. :)

One more thing: I just remembered an example of a synchronous operation
that accepts a delegate, which is easily confused with an event handler
(since handling events is a common use for a delegate).

If you look at Image.GetThumbn ailImage(), you'll see that it accepts a
"callback delegate", even though it is a synchronous operation (that
is, it doesn't return to its caller until the thumbnail image is
complete).

Don't confuse this with an "event handler". GetThumbnailIma ge() calls
this delegate from time to time to see if the user wants to cancel the
operation. However, it's just a delegate. There are no events involved.
Same language construct, different purpose.

Nov 16 '05 #12
Bruse a quick question:

For innstance calling Update method from DataAdapter (According to your
explanation) must be classified as Synchronous invocation,righ t?
because the user is left waiting till he gets notified by the result of his
invoction.

Thanks
Ali-R
"Bruce Wood" <br*******@cana da.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Thanks. :)

One more thing: I just remembered an example of a synchronous operation
that accepts a delegate, which is easily confused with an event handler
(since handling events is a common use for a delegate).

If you look at Image.GetThumbn ailImage(), you'll see that it accepts a
"callback delegate", even though it is a synchronous operation (that
is, it doesn't return to its caller until the thumbnail image is
complete).

Don't confuse this with an "event handler". GetThumbnailIma ge() calls
this delegate from time to time to see if the user wants to cancel the
operation. However, it's just a delegate. There are no events involved.
Same language construct, different purpose.

Nov 16 '05 #13
Yes. I've used it myself, and it's synchronous: the caller is left
waiting until the database is updated and the number of affected rows
is returned.

I haven't tried this myself, but if you wanted an asynchronous Update
(update the database while "I" (the calling method) continue to do
something else, and let me know when you're done), it looks to me as
though you have to "roll your own" asynchrony by spinning off another
thread and asking for notification when that other thread finishes its
work (the Update). That way you could continue what you were doing
while the other thread blocked on the Update operation. When the
Updated completed, the other thread would then send you an event (via
Invoke) to tell you that it was done, and terminate.

Your thread (the main thread) could then continue working while the
Update was happening, and either pay little attention to the resulting
event coming back, or, if the user asked to do something that logically
required the update to be complete, block at that point, waiting for
the Update to finish before moving on. (Asynchrony doesn't mean that
you can't _ever_ wait for the operation to complete before moving on;
it just means that you have the choice not to wait if you don't want
to. In a synchronous world, you have no choice: you have to wait.)

You might want to read at least part of Jon Skeet's article on threads:
http://www.yoda.arachsys.com/csharp/threads/

Nov 16 '05 #14

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

Similar topics

3
1867
by: David | last post by:
Hi There! I'm using Timer control to record how long my application perform certain tasks. However, apparently Timer control is not doing its' job (i.e. Not firing Tick event) while my application is busy. So even if my application took 2 mins, the label that is used to show the number of seconds elapsed will still say "2 seconds".
3
2492
by: Matthew King | last post by:
Hi all I've written a asynchronous socket client class, but i've found that in order to consume it I have to use events, and cannot simply for example SocketClient client = new SocketClient(110, "some.server.com") client.Connect() client.SendData("Hello World") Instead I have to wait for the async method to raise a Connected event, and call client.SendData from there, for complex chains of operations this because a nightmare chain of...
8
2303
by: Trotsky | last post by:
Hi I have asked a similar question on the web services discussion group, but the question is a bit more related to ASP.Net. Basically I have a ASP.Net application that calls a web service asynchronously. This is fine. My problem is that when I make a call to the web service asynchronously when I get the return which is passed into a static method I cannot reference any Web Contorls to paste the return values into from within the static method....
1
1327
by: Henrik Dahl | last post by:
Issue: I have a remote service executing notoriously asynchronously which I must be able to use from my Compute_Click(...) event handler. The WebForm I have contains only two controls: A Compute button and a Result textbox. I may easily start the asynchronous execution in the Compute_Click event handler. The asynchronous service notifies me when it's result is ready, the notification is done by a delegate invoking ResultReady(...). My...
1
2877
by: dba123 | last post by:
I need to perform Asynchronous Inserts using DAAB. So far I have a method which does an insert but how can I do this Asyncronously so that it does not affect the load on our public production website? This question is wide open but make sure you give me some ideas in context with DAAB syntax. Some thoughts are threading, ATLAS, etc. but I have no clue how to even approach an Asynchronous Insert or any techniques at this point. Also, I...
3
5667
by: =?Utf-8?B?aGVyYmVydA==?= | last post by:
I need to build an event-based asynchronous pattern (around a send/receive messaging API). Is there a step-by-step guidance about how to write code for the EBAP ? Does any book cover this theme (VB.NET preferred)? thanks herbert
4
4077
by: Morgan Cheng | last post by:
Since ASP.NET 2.0, asynchronous web service client can be implemented with event-based pattern, instead of original BeginXXX/EndXXX pattern. However, I didn't find any material about event-based server side asynchronous web service. So, we can only implement asynchronous webmethod with BeginXXX/EndXXX pattern, right? I don't why ASP.NET 2.0 don't provide event-based server side pattern.
0
1426
by: Morgan Cheng | last post by:
Since ASP.NET 2.0, asynchronous web service client can be implemented with event-based pattern, instead of original BeginXXX/EndXXX pattern. However, I didn't find any material about event-based server side asynchronous web service. So, we can only implement asynchronous webmethod with BeginXXX/EndXXX pattern, right? The only server side asynchronous web method post is http://msdn2.microsoft.com/en-us/library/aa480516.aspx. I don't...
167
8320
by: darren | last post by:
Hi I have to write a multi-threaded program. I decided to take an OO approach to it. I had the idea to wrap up all of the thread functions in a mix-in class called Threadable. Then when an object should run in its own thread, it should implement this mix-in class. Does this sound like plausible design decision? I'm surprised that C++ doesn't have such functionality, say in its STL. This absence of a thread/object relationship in...
0
8831
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
9374
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...
1
9325
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9249
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
8244
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
6796
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
6076
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
3315
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
3
2215
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.