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

  • SEARCH
  • Home
  • 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 7158205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:01:27+00:00 2026-05-28T13:01:27+00:00

Anyone knows the easy way to do so? Basically after I queue all works,

  • 0

Anyone knows the easy way to do so?

Basically after I queue all works, I want to wait until all I queued has been done. How do I do so?

   loopThroughAllBlog(whattodo, login)'queue all works

//what to do here to wait till all queued works are done.

    Dim whatToWrite = New Generic.List(Of String)
    For Each domain In domainsSorted
        whatToWrite.Add(dictionaryOfOutput.Item(domain))
    Next
    coltofile(whatToWrite, "output.txt", True)

I notice there is no way to know how many threads are still running in the threadpool.

  • 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-28T13:01:28+00:00Added an answer on May 28, 2026 at 1:01 pm

    I ended up answering my own question because there is no answer.

    Public Function threadPoolIdle() As Boolean
        Dim workerThreads As Integer
        Dim completionPorts As Integer
        Dim maxWorkerThreads As Integer
        Dim maxCompletionPorts As Integer
        Dim stillWorking As Integer
    
        Threading.ThreadPool.GetAvailableThreads(workerThreads, completionPorts)
        Threading.ThreadPool.GetMaxThreads(maxWorkerThreads, maxCompletionPorts)
        stillWorking = maxWorkerThreads + maxCompletionPorts - workerThreads - completionPorts
    
        If stillWorking > 0 Then
            Return False
        Else
            Return True
        End If
    
    End Function
    
    Public Sub waitTillThreadPoolisIdle()
        Do
            Sleep(1000)
            Application.DoEvents()
        Loop While threadPoolIdle() = False
    End Sub
    

    I think this is just awkward. There has to be a better way.

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

Sidebar

Related Questions

I was wondering if anyone knows an easy way to do this. I have
Anyone knows if there is an easy or known way to write a deep
I hope this question has an obvious answer to anyone who knows his way
I am wondering whether anyone knows a easy way to convert a latex math
Does anyone know an easy way to hide hashtags in the user's address bar?
Anyone know of an easy way to parse a Lua datastructure in C# or
Does anyone know of an easy way to escape HTML from strings in jQuery
Does anyone know of an easy way to copy a database from one computer
Does anyone know of an easy (built in) way to convert a string like
Does anyone knows a web application security scanner for mac and easy to install?

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.