use signal channel to trigger flushing
Merge pull request #7 from adeven/improve_buffered_queue

use signal channel to trigger flushing