0

I have two static function

namespace
{
 std::mutex mtx;
}

//static
static void func1()
{

}

//static
static void func2()
{
}

func1 & func2 are mutually exclusive in different threads. If i want to use std::mutex to manage the call what should be the best to use? std::lock_guard or std::unique_lock?

sohel14_cse_ju
  • 2,341
  • 8
  • 31
  • 54

0 Answers0