implemented event loop in writer. big performance issue
Merge pull request #10 from cbernet/event_loop

implemented event loop in writer. big performance issue