Asynchronous vs GUI Thread


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Asynchronous vs GUI Thread

  1. #1
    Join Date
    Jan 2005
    Posts
    26

    Asynchronous vs GUI Thread

    I'm developing a FTP client application with async. methods. Using delegates and begininvoke.

    But, still the application doesn't seem to be multithreaded from main GUI's thread cuz during download it halts and the GUI interface blanks out. It returns to normal only after the download has been done.

    The code doesnt' return to "// other processing stuff //////////" from below till downloading is complete.


    Thanks,
    JJ

    -------------------------


    For thsoe who're interested in code:

    class A

    {

    DelegateDownload d = new DelegateDownload (b.Download);
    d.BeginInvoke(...., ...., ....., ...., new AsyncCallback(b.DownloadCallback);

    // other processing stuff //////////

    } //end of class A


    class B
    {

    public void Download(..., ...., ...., ....)
    {
    }

    public void DownloadCallback(IAsyncResult ar)
    {

    }

    } //end of class B

  2. #2
    Join Date
    Jan 2005
    Posts
    26
    I got the solutions. The solution above is correct.

    Regards,
    JJ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center