This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************************************************************* | |
* Windows Registered I/O (RIO) Sample Code (Echo Server) | |
* Minimum requirement: Windows 8 or Windows Server 2012 | |
* Author: @sm9kr | |
* | |
* Notice | |
* 몇몇 코드 조각들은 (http://www.serverframework.com/asynchronousevents/rio/)에서 가져옴. | |
* 그런데 여기도 제대로 완성된 코드가 있었던 것은 아니라서 상당 부분 기능을 추가하여 동작하도록 함. | |
* RIO의 사용법을 보여주기 위한 코드라 최대한 간단하게 필요한 부분만 넣었음. | |
* 그래서, 버그가 있을 수 있음... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
/**************************************************************************** | |
* Wait-Free MPMC Queue | |
* Minimum requirement: Windows XP or Windows Server 2003 | |
* Author: @sm9kr | |
* License type: GPL v3 | |
* Drawback: Fixed size, __int64 overflow-able | |
****************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
/**************************************************************************** | |
* Wait-Free MPSC Queue | |
* Minimum requirement: Windows XP or Windows Server 2003 | |
* Author: @sm9kr | |
* License type: GPL v3 | |
* References | |
** [1] http://groups.google.ru/group/comp.programming.threads/browse_frm/thread/33f79c75146582f3 | |
** [2] http://www.boost.org/doc/libs/1_35_0/doc/html/intrusive/intrusive_vs_nontrusive.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Collections.Concurrent; | |
#pragma warning disable 0420 | |
namespace ObjectPoolSample |