289. http://en.wikipedia.org/wiki/Asynchronous_I/O
EventBus eb = vertx.eventBus();
HandlerMessage myHandler = new HandlerMessage()
{
public void handle(Message message) {
System.out.println(I received a message
+ message.body);
}
};
eb.registerHandler(test.address, myHandler);
eb.publish(test.address, hello world);
12년 10월 9일 화요일
322. Multi-reactor pattern
Event Loop Run Loop Event Dispatcher
Message Dispatcher Message Pump
“The purpose of a run loop is to keep your thread
busy when there is work to do and put your
thread to sleep when there is none.” - iOS docs
출처: http://krondo.com/wp-content/uploads/2009/08/twisted-intro.html
12년 10월 9일 화요일