Skip to content

Instantly share code, notes, and snippets.

@ujentus
ujentus / RIOServer_sm9.cpp
Created July 15, 2013 02:11
Windows Registered I/O (RIO) Sample Code (Echo Server)
/*********************************************************************************************************
* 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의 사용법을 보여주기 위한 코드라 최대한 간단하게 필요한 부분만 넣었음.
* 그래서, 버그가 있을 수 있음...
@ujentus
ujentus / MPMCQueue.cpp
Created November 9, 2012 07:03
MPMC Wait-free Queue for C++, Windows
#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
****************************************************************************/
@ujentus
ujentus / WaitFreeQueue.cpp
Created November 7, 2012 08:48
MPSC Wait-free Queue for C++, Windows
#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
@ujentus
ujentus / ObjectPool.cs
Created November 2, 2012 13:24
Object Pool Sample
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