Reactor epoll in multithreaded enviroment

Usually the reactor pattern use one process and one thread. The main goal of Reactor pattern is to seperate the application sepecific code. But some time IO is the bottleneck of performance. so I try to apply the Reactor pattern in a multithreaded enviroment. The detailed code is here! .

Read More

A simple memory pool template

If you run into a situation that you need to allocate a specific object very frequently. Obviously the traditional way will cause the memory fragment because of frequent allocation on heap, and you will get more risk for failure of allocation after a certain running period. so this situation the memory pool definately is your best choice.

Read More

Blocking Queue for Producer and consumer pattern

As we knew, The queue is the core component of the producer and consumer pattern. and the another important one is how to wake up one of the consumer. Because Most of time, we get more than one comsumer. Fortunately we can combine the queue and condition variable to achieve this goal using C++ 11.

Read More

Five different types IO in Linux

There are five different type IO model under Linux , they are respectively

*Blocking IO
*NonBlocking IO
*IO Multiplexing
*Signal-Driven
*Asynchornours IO
I am going to illustrate the Read function to explain these types of IO model.

Read More

The definition of l-value and r-value in C++

Accroding to the MSDN website, the definition of l-value like below:

Expressions that refer to memory locations are called “l-value” expressions. An l-value represents a storage region’s “locator” value, or a “left” value, implying that it can appear on the left of the equal sign (=). L-values are often identifiers.

Read More

2017
Card image cap

EthanHao

Being fear of something means something

  • Location: Chicago
  • Degree: Master of DePaul University
  • Current GPA: 3.97
  • Email: ethanhaous@gmail.com
  • Phone: (312)532-4772