[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
OO Threads (was RE: Learning C)
I've been reading the pthreads book by O'Rielly to brush up on my knowledge of
threads, and I've got a question for all you OO (Object Oriented) people. And
that's that threads make sense in a procedural world, for example I do something
like:
void fucntion1(int r1);
int main() {
pthread_t thread1;
int r1;
pthread_create(thread1, NULL, (void*) function1, r1);
...
}
And the function I declared gets executed as the start of the thread. I can't
figure out/envision how this works in the OO model, and O'Rielly doesn't really
mention it. Do I pass a pointed to a method in an object? Or in C++ can I pass
a pointer to an object itself?
Systems and Network Administrator
Morrison Industries
1825 Monroe Ave NW.
Grand Rapids, MI. 49505