Here is a complete example showing how to write a call to an asynchronous Chilkat method in .NET Core. (Note: This is .NET Core, not .NET Framework.) This example uses the TaskCompleted callback to get notified when the task completes.
Question: We have a desktop application(client) that can communicate to many devices(servers) at the same time. A different thread pool is used for each device communication, so they do not block each other or the main thread. Because of the issue earlier, I am using the same http object for all communications. Most of the requests are very quick (~ […]
Question: When using asynchronous socket methods, VFP crashes. Try running the code from the example under VFP https://www.example-code.com/foxpro/socket_async.asp What else do I need to configure? Answer: The older IDE’s such as VB6 and FoxPro don’t take kindly to background threads. The solution is to clean up the threads at the end of your program by doing this: loGlobal = CreateObject(‘Chilkat_9_5_0.Global’) […]
This post shows the general technique to get the object returned by a method when it is called asynchronously. For example, consider the Mailman.GetUidls() method. A synchronous call to GetUidls returns a StringArray object, as shown here: However, the async version of the method, GetUidlsAsync, returns a Task object. The TaskCompleted callback is called when finished. The following code […]
Chilkat implements a thread pool for asynchronous tasks in all programming languages except for Node.js. For Node.js, Chilkat tasks run directly on Node’s internal thread pool (i.e. the libuv thread pool). The Task.Run() method can have 0 or 1 arguments. If an argument is passed, it is the “task completed” callback that get called when the task has completed. Here […]
Event callbacks in Java (including Android) are supported starting in v188.8.131.52. To receive event callbacks, first create a Java class derived from one of the Chilkat event callback classes. The event callback classes are: CkBaseProgress, CkHttpProgress, CkZipProgress, CkFtp2Progress, CkMailManProgress, CkTarProgress, and CkSFtpProgress. All future Chilkat classes will only use CkBaseProgress. Theses event callback classes will be documented in the “Events” […]
Demonstrates a TaskCompleted event for an asynchronous Chilkat method call. The event callback occurs in the background thread, and therefore any updates to the UI must happen on the UI thread. For this reason, MethodInvoker is used to make updates to a TextBox..
This sample C# snippet demonstrates how to use the TaskCompleted event to be notified when an asynchronous method completes. Given that the event callback is in the background thread, any UI updates must occur on the main thread. This example demonstrates how to do it:
Starting in Chilkat v184.108.40.206, asynchronous capability is added across all classes and all programming languages. The new Task and TaskChain classes have been added. To Beta test, send email to firstname.lastname@example.org. Please specify the programming language, operating system, etc. that is needed. The online reference documentation has been updated. Examples will be forthcoming. Version 220.127.116.11 will be released later this […]