Listing 5: Starting threads with member functions

struct X {
    void f(int i) {
      //...
    };
};

int main () {
  X x;
  Thread t = spawn(x, &X::f)(1);
  t.join ();
};

— End of Listing —