Template:cpp/thread/dsc counting semaphore