Enable to pause the repository (#215)

@calmh 
I implement pause in the way that you described in #215.
Some feedback will be valuable.
This shouldn't be there.
Btw, I'm not expecting any problems with race condition.