Click here to Skip to main content
15,885,914 members
Everything / AsyncTask

AsyncTask

AsyncTask

Great Reads

by Miguel Diaz Kusztrich
An infinite set of biological shape fractals in the complex plain
by ss9o9o9o
Transferring backup files from a remote SQL Server and Dynamic SQL Connection with Restore utility.
by Nosey Parker
TcpClient.BeginConnect with timeout
by Eduardo Antonio Cecilio Fernandes
How to handle asynchronous tasks in Android Activities

Latest Articles

by Miguel Diaz Kusztrich
An infinite set of biological shape fractals in the complex plain
by Swapnil Dhage
This is a helper/utility class that will add a layer of abstraction as well as separation for dispatcher related operations in WPF.
by Daniel JXHV
No more ORM, EF, A Stored Procedure direct Access framework for JavaScript.
by SubhamoyBurman
Use of Task Parallel Library and Async/Await in your application

All Articles

Sort by Score

AsyncTask 

27 Nov 2017 by Miguel Diaz Kusztrich
An infinite set of biological shape fractals in the complex plain
19 Jun 2015 by ss9o9o9o
Transferring backup files from a remote SQL Server and Dynamic SQL Connection with Restore utility.
14 Sep 2016 by ZurdoDev
As mentioned in comments the server should handle that for you. If you find that your server cannot handle the load then you implement load balancing or some other technique but your code will stay the same, essentially.
19 Mar 2015 by Rahul121616
Following is the Jquery code for the change event whenever the file uploaded or changed. var document1FileUpload = $('#Document1FileUpload');var fileNameTextBox1= $('#fileNameTextBox1');document1FileUpload.die(); document1FileUpload.live('change', function () { ...
7 Oct 2014 by Nosey Parker
TcpClient.BeginConnect with timeout
19 Nov 2014 by Sandeep Londhe
Hello Everyone, I am creating an app where i have the requirement to upload the image with different details:For Example I Have To Upload Following Details With Image As Well:1. Latitude2. Longitude3. IMEIAnd Have To Use AsyncTask. But I am having problem using AsyncTask With It....
8 Dec 2014 by Santiago Fabian
Protected void Page_Load(object sender, EventArgs e){ XDocument response = ThirdPartyAPI.HttpRequest(someParams); if(response != null) { var node = response.Root.Elements("documents").Elements("document"); string url =...
8 Dec 2014 by Assil
Looks to me that ThirdPartyAPI.HttpRequest is asynchronous method, in which case there should be some method or property in ThirdPartyAPI that indicates whether the HttpRequest is still busy or done..and that very API could be used in lieu of if(response != null)Can you look into that?
16 Dec 2014 by User1454
HI everyone, Using asynctask in android, for tcp/ip connection how can i ensure client is connected or not. I have to disconnect connection using asynctask manually. Please help how to do????????????????This is the code i used: public class MyClientTask extends...
26 Feb 2015 by phil.o
By using FileShare.None you explicitly define the behaviour that you get.Better use FileShare.ReadWrite and see what happens.Good luck.
31 Mar 2015 by Andy Lanng
Hi,I want to concatenate the outputs of several async methods into a single sourceI am writing several APIs that will parse data from 3rd party sources and return a standard typed item.I played with the idea of firing events for each item but it appears that each API could...
4 Mar 2016 by braop
I created a tabbedlayout and i have three different fragments. however i would like to execute an async task in each of the fragments but i have failed to execute the async task within the fragment.One of my fragments looks like...
29 Mar 2016 by arslan afzal bhatti
i want to upload the video by using youtube upload data api but unfortunately when i tried to upload the video it generate the errot that A Task was Cancelled This error is generate due to this line of code await videosInsertRequest.UploadAsync(); in my code i already have apply the ...
29 Mar 2016 by Dave Kreskowiak
Try putting an AsyncTimeout attribute on both the UploadVideos and Upload methods.
29 Mar 2016 by arslan afzal bhatti
ok i had found the solution of this problem You need to set the timeout before you use the service. YouTubeService youtubeService = new YouTubeService(initializer); youtubeService.HttpClient.Timeout= TimeSpan.FromMinutes(60);this will solve the task cancelled...
12 Jul 2016 by biru2910
When compiler reaches onPostExecute and trying to run execute JSONArray the linejsonArray=jsonObject.getJSONArray("server_response");throws an exception:org.json.JSONException like: "Value[{"code":"login_true","name":"hhh","email":"hhh"}] of type org.json.JSONArray cannot be...
16 Jan 2018 by Member 4611734
I have an Excel vsto application in c#, I want to insert a UDf defined in C# as a formula in Excel in such a way that as soon as user types in excel cell like Myfunction( ,i.e. as soon as she opens the parenthesis, predictive search should be shown for first parameter may be inside a winform in...
16 Jan 2018 by bernova
as follow ,what's the best methods for use async/await for Multiple Task : semicode: public class Process { public Process() { this.ProcessItem(); } } private async void ProcessItem() { while (true) { await this.FetchDeviceData();...
16 Jan 2018 by David_Wimbley
Here is one way you could achieve what I think you are wanting to do. var tasks = new List(); tasks.Add(Task.Factory.StartNew(() => { // add long running task here - 1 })); tasks.Add(Task.Factory.StartNew(() => { // add long running task here - 2 })); ...
8 May 2018 by Pascualito
Should I use Async or simply Sync methods in my WebApi aplication? I use mvc5 and EF 6. The operations are mainly CRUDs and listing ( select against the database ) and the DB queries are running quite fast. The system is used by about 1000 concurrents users. Do I gain performance using...
31 May 2018 by Richard Deeming
Make it async all the way down: private async void button2_Click(object sender, EventArgs e) { ... else { await Callmethod(); } } private async Task Callmethod() { Hide(); List filesToZip = searchpattern .AsParallel() ...
21 Mar 2019 by Amod Kumar Chandra
I am facing following issue NETSDK1064 Package AsyncUsageAnalyzers, version 1.0.0-alpha003 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. Can anyone help...
21 Mar 2019 by Richard Deeming
It's a pre-release package, so you'll need the IncludePreRelease flag to install it: Install-Package AsyncUsageAnalyzers -Version 1.0.0-alpha003 -IncludePrerelease Pre-release versions in NuGet packages | Microsoft Docs[^] NB: That package has not been updated in four years, and the GitHub...
25 Jun 2021 by OriginalGriff
Quote: I don't want to use Threading to achieve this. Well ... tough. There is only one UI thread, and if you block it doing a long task, then the display doesn't get updated. Unless you move the long running code off the UI thread completely,...
26 Jun 2021 by honey the codewitch
You have on user interface thread. Your problem cannot be solved by somehow waiting for the form to load. You need to find out why the form is taking so long to load, and move that code out of the form load event, and into a background worker task.
29 Jun 2021 by Richard Deeming
Marking a method with the async keyword doesn't magically make it run asynchronously. It doesn't spin up any threads in the background. All it does is enable the use of the await keyword within that method, so that you can execute IO-bound code...
5 Jul 2022 by Telstra
I have this code in which I am calling a stored procedure and that stored procedure will return 1 or 0 based upon its execution. public async Task CreateData(int id, string name) { return await...
16 Nov 2022 by Graeme_Grant
There is a lot wrong here. 1. The method that you want to await is not marked as async 2. The asynchronous call to PerformWriteRequestAsync in method WriteMultipleCoilsAsync is not awaited. You should have: private async void...
16 Nov 2022 by Richard Deeming
Graeme (Solution 1) is correct that you should avoid async void[^] wherever possible. Unfortunately, that doesn't address the actual problem. Your two WriteMultipleCoilsAsync methods return Task, not Task. That means there is no result...
7 Jul 2014 by Eduardo Antonio Cecilio Fernandes
How to handle asynchronous tasks in Android Activities
20 Aug 2014 by sgoleary
High Resolution Timer EventArg Class for timing background tasks.
9 Jul 2014 by Andreo Romera
In this first tutorial, we are going to learn how to make calls to a Web Api Rest Service using the NuGet Package WebApiRestService.WebApiClient
19 Jul 2015 by Revanth Ramesh
Futuristic Talking 7-Segment Time Display Widget in WPF
25 Nov 2015 by Amir Dashti
Simply understand what happens when you use async/await keywords, what are the benefits and how to prevent deadlocks
17 Jan 2016 by SubhamoyBurman
Use of Task Parallel Library and Async/Await in your application
10 Apr 2017 by Swapnil Dhage
This is a helper/utility class that will add a layer of abstraction as well as separation for dispatcher related operations in WPF.
17 Mar 2016 by Daniel JXHV
No more ORM, EF, A Stored Procedure direct Access framework for JavaScript.
26 Feb 2015 by Member 9308808
What is the best way to execute file opening asynchronously even before copying begins. The exception I get is that the file is not accessible because its being used by another process.My code is shown below: try { using (var sourceStream = new...
15 Feb 2015 by Gaurav_Chaudhary
You can use "Async" and "Await" keywords ,if it's C# 4.5 or above.. Check this out https://i-msdn.sec.s-msft.com/dynimg/IC612215.png[^]Thanks
14 Sep 2016 by Member 11528655
I have created on web service which receives request from one mobile application and forward it to one another server,and it reply back to the mobile application with the response which my web service has received.Now my question is, how i can handle multiple requests from multiple mobile...
31 May 2018 by Member 13801408
private void button2_Click(object sender, EventArgs e) { searchpattern = txtpatterns.Lines; searchpattern = searchpattern.Take(searchpattern.Count() - 1).ToArray(); sourcepath = txtsourcepath.Text; destinationpath = txtUnzippath.Text; ...
29 Jun 2021 by thrainder
Hi, I am working on a slow form that takes some time to get open so I want to open a loading winform that I have designed. I don't want to use Threading to achieve this. This is not Working because the Loading form is not opening correctly...
16 Nov 2022 by Paul Dietz
I could use some help getting the WriteMultipleCoilsAsync task to run. I'm getting the error message Cannot assign void to an implicitly-typed variable on the Task.Run statement. I need to capture the response message from...