$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Peter (piotrus_at_[hidden])
Date: 2002-06-18 06:29:22
Thanks Peter.
"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:00b201c216b4$eea94430$1d00a8c0_at_pdimov2...
> From: "Peter" <piotrus_at_[hidden]>
> > Is it possible to pass a pointer of a class member function into a
thread
> ??
> > I have no problems passing functions (or pointers to functions rather)
> which
> > are not members of any classes. However when I try to pass member
> functions,
> > I get compile errors. I am using MSVS 6.0 on win 2000.
>
> [...]
>
> > boost::thread myThread(&object1.fun1) ; // PROBLEM
HERE
>
> This is not a pointer to a member function; you are trying to combine an
> object with a member function (a construct known as "closure.")
>
> Standard C++ doesn't have closures, but you can use
> boost::bind(&testClass1::fun1, &object1) to simulate one.
>
> _______________________________________________
> Unsubscribe & other changes:
http://listarchives.boost.org/mailman/listinfo.cgi/boost
>