refactor: replace PersistSemaphore with PersistChannel
#1710
+272
−214
PersistSemaphore with PersistChannel
#1710