locked
Windows Registered I/O (RIO) and Windows ThreadPool RRS feed

  • Question

  • moving question from Windows Server network forum as suggested on list to development forum.  I'm not sure if this is the correct one or not though:

    Does the new Registered I/O for Winsock in server 2012/Win8 work with the built in Windows threadpools or do I need to use IOCP apis to interact with it?  I have a service that makes heavy use of winsock and I bind threadpools to the completion of winsock request to simplify the programming model.

    thanks.

    Friday, August 30, 2013 8:52 PM

Answers

  • I found my answer in the docs online:

    http://msdn.microsoft.com/en-us/library/windows/desktop/hh437191(v=vs.85).aspx

    An application using thread pools can use thread pool wait objects to get RIONotify completions via its thread pool.  In that case, the call to the SetThreadpoolWait function should immediately follow the call to RIONotify.  If the SetThreadpoolWait function is called before RIONotify and the application relies on RIONotify to clear the event object, this may result in spurious executions of the wait object callback.

    • Marked as answer by bmobile Saturday, August 31, 2013 9:51 PM
    Saturday, August 31, 2013 9:51 PM

All replies

  • I found my answer in the docs online:

    http://msdn.microsoft.com/en-us/library/windows/desktop/hh437191(v=vs.85).aspx

    An application using thread pools can use thread pool wait objects to get RIONotify completions via its thread pool.  In that case, the call to the SetThreadpoolWait function should immediately follow the call to RIONotify.  If the SetThreadpoolWait function is called before RIONotify and the application relies on RIONotify to clear the event object, this may result in spurious executions of the wait object callback.

    • Marked as answer by bmobile Saturday, August 31, 2013 9:51 PM
    Saturday, August 31, 2013 9:51 PM
  • Somehow it is still not clear to me how to use the Threadpool and the RIO API properly.

    Is it possible to use the Threadpool with IOCP based completion Type, or with Event based completion type? OR polling? How to do it? How to connect a thread pool wait opbject with a RIONotify completion?

    I could not find any examples regarding this so far, abd the MSDN documentation is not very clear about this.

    Thank you!

    Monday, April 29, 2019 10:07 PM
  • @bmobile

    How did you solve it in your application?

    Friday, July 5, 2019 8:23 AM