login about faq

If you have WithEvents and use the SyncronousRequestAsync method it will crash the IDE when you attempt to write LastErrorText to the debug window. I assume the idea is that you wouldn't use WithEvents with Async so I have removed them for now. (that took up my morning to find that issue) Am I correct? Or is it buggy?

asked Dec 04 '15 at 10:04

chilkat's gravatar image

chilkat ♦♦

When a method is running asynchronously, it is running in a background thread. If callbacks are utilized, then the callback is occurring in a background thread (it is not in the foreground thread). The solution is to tread lightly and carefully because what is possible or not possible depends on the programming language and runtime environment. For example, in .NET you would need to do this: http://www.cknotes.com/c-taskcompleted-event-updating-the-ui-from-a-background-thread/

Your event callback method might simply update a variable within your code such that your foreground thread can periodically check for changes.


answered Dec 04 '15 at 10:09

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Dec 04 '15 at 10:04

Seen: 451 times

Last updated: Dec 04 '15 at 10:09

powered by OSQA