Article View: comp.os.os2.programmer.misc
Article #260Thread-specific variables?
From: Keith R. Bennett
Date: Thu, 30 Sep 1993 11:29
Date: Thu, 30 Sep 1993 11:29
21 lines
1592 bytes
1592 bytes
I have a question about thread programming. Is there any way to make a given variable specific to an instance of a thread? The best I can think of so far is to use either local variables, or variables allocated from the heap. There is a large number of these variables that will be thread-specific, so I was thinking of putting them in structures and creating a new instance of each structure for each thread. The C++ programmers guide mentions that there is a separate copy of errno for each thread. Can I do that with my own variables? Thanks for any help. - Keith -- -------------------------------------------------------------------------- Keith Bennett Bennett Business Solutions, Inc. C++/C Software Development 1605 Ingram Terrace kbennett@access.digex.net Silver Spring, MD USA 20906-5932
Technical Details
Message-ID:
<28efue$478@access.digex.net>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!gatech!swrinde!cs.utexas.edu!uunet!digex.net!digex.net!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11307a,b690185ddc355787,start X-Google-Attributes: gid11307a,public X-Google-Thread: 10cd94,b690185ddc355787,start X-Google-Attributes: gid10cd94,public X-Google-ArrivalTime: 1993-09-30 04:38:11 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!gatech!swrinde!cs.utexas.edu!uunet!digex.net!digex.net!not-for-mail From: kbennett@access.digex.net (Keith R. Bennett) Newsgroups: comp.os.os2.programmer.misc,bit.listserv.os2-l Subject: Thread-specific variables? Date: 30 Sep 1993 07:29:18 -0400 Organization: Express Access Online Communications USA Lines: 21 Message-ID: <28efue$478@access.digex.net> NNTP-Posting-Host: access.digex.net