TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: PETER SCHULLER
from: PETER YARD
date: 1997-03-30 14:14:00
subject: Multithreading member-fu

PS> >
PS> > Is there any way to multithread a C++ Class member-function? I'm using
PS> > VisualAge C++ 3.0, and I am trying to execute a member-
PS> > function in a separate
PS> > thread. But the compiler says "error EDC3167: The
PS> > "_Optlink" qualifier cannot
PS> > be applied to "void()".". If I however move the function
PS> > out of the class that
PS> > works, but instead I can't pass *this on to it.
PS> >
PS> > / Peter Schuller   [TeamOS/2]   peter.schuller@noreva.se
Make the member function "static".  I use multi-threaded member
functions quite a lot (Win NT4 though) and their general form is:
static DWORD WINAPI Myfunction(TMYPARAMS *t);
OS/2 may be somewhat different in the declaration though. Best of
luck.
Peter
 * SLMR 2.1a * C:\>Buy Windows   --->  Bad command or file name
--- Maximus/2 3.01
---------------
* Origin: Soft-Tech, Qld, Australia +61-7-3869-2666 (3:640/201)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.