+ Reply to Thread
Results 1 to 2 of 2

Thread: What is the difference between boost::condition_variable & condition_variable_any?

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    46

    What is the difference between boost::condition_variable & condition_variable_any?

    I am new to C++ and just started reading about boost.

    What is the difference between boost::condition_variable and boost::condition_variable_any?

  2. #2
    Junior Member
    Join Date
    Apr 2012
    Posts
    38
    Both of the provide a variable that can wait on some condition.

    condition_variable works with unique_lock<mutex>.

    While condition_variable_any can work on many object type including user defined.

    As condition_variable works only with unique_lock<mutex>, it is more efficient on some platform.

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts