From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,563ae5baf17e2466 X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-10-15 18:00:48 PST From: bell-lee@hpatlse.atl.hp.com (David Bell-Lee) Date: Fri, 15 Oct 1993 23:32:58 GMT Subject: Re: Sharing DCE Client Binding Handles? Message-ID: <3020001@hpatlse.atl.hp.com> Organization: Hewlett-Packard Co. Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!math.ohio-state.edu!sdd.hp.com!hpscit.sc.hp.com!hpuerca.atl.hp.com!hpatlse!bell-lee Newsgroups: comp.unix.osf.misc References: Derk, Regarding your question: > Can multiple threads within a DCE *client* share a fully bound binding > handle without using a mutex for the handle? If so, are there any > other precautions I should take when doing so? > Thanks in advance, > Derk > Though it is, in general, possible to do, expecially if you follow the guidelines mentioned in the two previous responses, I would be more inclined to give each thread its own binding handle. Don't forget that rpc_binding_copy() will dup a binding handle. You can use thread specific storage, pthread_cleaup_push(), and pthread_cleaup_pop() to manage the memory for the per thread binding handles. This would be useful in case you don't know how many threads (and therefore how many handles) you'll be using. I started out trying to share binding handles and quickly realized that I would have many fewer headaches using copies. *-------------------------------------------------------- * David Bell-Lee * Senior Technology Consultant * Hewlett-Packard Educational Services * Mountain View, CA * * Telephone : 415/691-3782 *--------------------------------------------------------