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 9158759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:19:31+00:00 2026-06-17T13:19:31+00:00

Under Windows, there are two means to insert work items for avoiding to create

  • 0

Under Windows, there are two means to insert work items for avoiding to create too many threads:

Means 1: Use IOCP;

Means 2: Use QueueUserApc.

However, means 1 is far more intricate than means 2.

So my question is: what are the advantages of means 1 relative to that of means 2?

  • 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-06-17T13:19:33+00:00Added an answer on June 17, 2026 at 1:19 pm

    When you call QueueUserApc, you must target a specific thread.

    IOCP has a built-in thread dispatch mechanism that QueueUserApc lacks that allows you to target the most efficient thread out of a pool of threads. The thread dispatch mechanism automatically prevents too many threads from running at the same time (which causes extra context switches and extra contention) or too few threads from running at the same time (which causes poor performance).

    Windows actually keeps track of the number of threads running IOCP jobs. It initially sets the number of threads it allows to run equal to the number of virtual cores on the machine. However, if a thread blocks for I/O or synchronization, another thread blocked on the IOCP port is automatically released, avoiding thread starvation.

    In addition, IOCP can be easily hooked up to I/O so that I/O events trigger dispatches of threads blocked on the IOCP port. This is the most efficient way to do I/O to a large number of destinations on Windows.

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

Sidebar

Related Questions

Is there a way to create a 'kiosk mode' in wxpython under Windows (98
I am wondering whether there is a vi like editor under windows command line?
In Windows Server 2008 and Windows 7 there are new Events categorized under Applications
I am using standard windows forms controls under C#. I have two controls which
Is there an analogue of this tool (maybe python/ruby/etc) which runs under windows? It
I have two Web Sites running under IIS6 (Windows Server 2003R2 Standard), each bound
In the Windows 7 UX Guide under the section on group boxes , there
Under Windows 7 I have a batch file for checking the status of some
Under Windows, I have used a program called Dependency Walker to examine the libraries
Under windows, this F# code will extend a file from say 12 bytes out

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.