I might be a little dense but cannot understand what below lines do?
class background_task
{
  public:
    void operator()() const
    {
      do_something();
      do_something_else();
    }
};
background_task f;
std::thread my_thread(f);
- I realize a thread (named - my_thread) is created which calls object- fof class- background_taskbut when is the function- operator()in class- background_taskactually called?
- Why is overloading of the function operator required? 
- I understand this is C++ 101 or very basic, but I still cannot grasp it, so which books should I refer to in order to learn more about such topics of C++. 
 
     
     
    