Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 908881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:47:17+00:00 2026-05-15T16:47:17+00:00

I have a vb.net 2.0 program, that has a batch/queue routine to execute tasks

  • 0

I have a vb.net 2.0 program, that has a batch/queue routine to execute tasks that take a long while. One of the tasks is “upload to ftp” of large files. The queue is started by the user clicking the “start” button, and then a for-loop just runs over each batch item, and does whatever it needs.

Now I want to implement a “cancel queue execution” button. The button should be clickable (the gui mustn’t be blocked by the queue being executed), and the button should stop the current queue action (I don’t care about rollback of previously executed tasks).

I guess I need separate threads and some kind of notification scheme, but at what point should I check if the notification is sent? In the for-loop of the queue? But then the user would have to wait for the full upload of the file before the break, which is not what he wants. In the “file upload” method? That’s putting too much code in one method, I feel intuitively.

I also need to do some cleanup of the current batch item’s actions (like delete the partially uploaded file), so that has to be factored in somewhere too.

Any suggestions in high-level code or with examples? Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:47:17+00:00Added an answer on May 15, 2026 at 4:47 pm

    Threads??????? your problem can be solved by using “BackgroundWorker”. I really love it, it made such tasks like a breeze..

    Try these links for more info:
    http://msdn.microsoft.com/en-us/library/8xs8549b.aspx
    http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx

    Regards.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .NET 2.0 program that has a reference to Interop.WIA.dll (.NET), which
I have a Util module in my VB.NET program that has project-wide methods such
Several times while debugging a VB.Net program I have found that continuation lines are
I have a vb.net program that has a web browser control, and we all
Hej Hej, I have a .Net program that has to run on a cluster
I have a .NET compact framework program that has my CE device open a
I have a vb .net program that exports information to certain fields of an
I have a vb.net program that uses mysql as its database. And it works
I have just started work on asmall program that sends text over net (TON)
I have an ASP.NET web service that I can access via a windows program

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.