What is the best practice for getting a webrequest asynchronously?
I want to download a page from the internet (doesn't matter what)
and avoid blocking a thread as much as possible.
Previously I believed that it was enough to just use the 'BeginGetResponse' and 'EndGetResponse' pair. But on closer inspection I also see that there is t...
Is there any feature of asynchronous calling in PL/SQL?
Suppose I am in a block of code would like to call a procedure multiple times and wouldn't bother when and what the procedure returns?
BEGIN
myProc(1,100);
myProc(101,200);
myProc(201,300);
...
...
END;
In the above case, I don't want my code to wait for myProc(1,100) ...
Here's what I'm trying to do.
When the 'Submit' form is clicked on my form, a javascript function will loop through all the fields of the form.
For each field a function will be called which would return true/false to indicate if it was filled in correctly or not.
If a false is returned, it shows an error message next to that field.
If...
In .net 3.5
trying to ThreadPool.QueueUserWorkItem(a=> {Work()}); when the ThreadPool has no available threads caused BeginInvoke lock up.
void Work()
{
Action executor = () = { DoSomething(); };
IAsyncResult result = executor.BeginInvoke(null, null);
using (WaitHandle hWait = result.AsyncWaitHandle)
{
if (hWait.Wait...
When reading data in chunks of say, 1024, how do I continue to read from a socket that receives a message bigger than 1024 bytes until there is no data left? Should I just use BeginReceive to read a packet's length prefix only, and then once that is retrieved, use Receive() (in the async thread) to read the rest of the packet? Or is ther...
I have a class containing a worker thread which receives data from a queue in a loop.
Another part of the app sinks an event from this class, which the class raises for each queue item.
These events are fired asynchronously, so at busy times the other part of the app can be processing several events at once.
This should be fine but we...
To cut a long story short - read this article first and then this article. In short - it's the old issue about ASP.NET and randomly switching among threads. Well, not so randomly actually. As the second article explains, this only happens "when your thread performs an async IO operation". So... what the heck is an async IO operation in t...
Hi,
I've got the following scenario: when a user moves the mouse out of a popup, I want an animation to happen, and five seconds later, I want to remove a PopUp.
This is the code I expected to do this with is:
private bool leftPopup = false;
public void AnimatePopupOut(object sender, MouseEventArgs e)
{
myAnim.Begin();
(new Thre...
I'm having some weird behavior in an application which is puzzling me.
I create a thread, let's call it worker, which is responsible for handling communication requests. Clients write on a pipe while the thread consumes the requests and send messages.
Now, the main loop of the thread has something like this:
lock(this)
{
object_id =...
What options for async io (socket-based) are there in java other then java.nio? Also does java.nio use threads in the backround (as I think .NET's async-socket-library does, maybe it's been changed) or is it "true" async io using a proper select call?
...
What is the EventName property when I set up a ASP.NET checkbox control as an async postback trigger for an asp.net update panel?
...
A call from a Silverlight 2.0 control to a WebService, returned via MyWebServiceNameEventArgs is not returning contained List<> aggregates. For Example, I've got a Person class that has a List and List. When I trace the call I see that the person has the lists are populated appropriately. However, when it arrives via the MyWebServiceN...
I'm developing open source cross-platform platform for non-realtime multiplayer chat/game system. Like card games, boardgames, turn-based, etc. Servers are spawned server-side (not from users computer). Client has these game modules or downloads game module and then runs them.
I've come to conclusion that best protocol is "IRC-like". S...
I am writing an API in C# and I want to provide both synchronous and asynchronous versions of the publicly available methods.
For example, if I have the following function:
public int MyFunction(int x, int y)
{
// do something here
System.Threading.Thread.Sleep(2000);
return x * y;
}
how can I create an asynchronous version...
I'm re-building an IM gateway and hope to take advantage of the new performance features in AsyncSockets for .net35.
My existing implementation simply creates packets and forwards IM requests from users to the various IM networks as required, handling request/ response streams for each connected users session(socket).
i presently have...
Does asynchronous call always create a new thread?
Example:
If Javascript is single threaded then how can it do an async postback? Is it actually blocking until it gets a callback? If so, is this really an async call?
...
Does an asynchronous call always create a new thread? What is the between the two?
EDIT:
Does an asynchronous call always create or use a new thread?
Wikipedia says:
In programming, asynchronous events are those occurring independently of the main program flow. Asynchronous actions are actions executed in a non-blocking scheme, allo...
In C#, when receiving network data with the BeginReceive/EndReceive methods, is there any reason you shouldn't process the packets as soon as you receive them? Some of the tasks can be decently cpu intensive. I ask because I've seen some implementations that push the packets off into a processing queue and then handle them there. To me t...
I understand the benefits of the new async sockets in .net35 as applys to building socket servers.
1) Please do these benefits apply to building client applications?
2) what would be the recommended way to use the xxxxAsync pattern when building an application that establishes multiple client connections.
I would really appreciate your...
I have an asp.net page with a save button within an updatepanel and contenttemplate. The save works nicely, but I am trying to add a "wait" gif while the save is happening using JQuery, but the ajaxStart event is not firing. I put a simple catch shown below:
$(document).ajaxStart(function(){
alert('starting');
...