pgm: Add utility for limiting threads based on DB pool size

Change-Id: Ia398bd289996c1010d7c487246c791f970ddfa89
2 files changed