DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links