Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #14830

Re: copy/pass a va_list to another thread

From BGB <cr88192@hotmail.com>
Newsgroups comp.lang.c++
Subject Re: copy/pass a va_list to another thread
Date 2012-03-08 09:25 -0700
Organization albasani.net
Message-ID <jjaml8$evb$1@news.albasani.net> (permalink)
References <15783154.7098.1331159818084.JavaMail.geo-discussion-forums@vbgu10>

Show all headers | View raw


On 3/7/2012 3:36 PM, Christopher wrote:
> Working on a pre-existing interface that I am not allowed to change, which uses a va_list argument. The method takes way too long to execute and is a canidate for splitting off into another thread. However, I am not sure how I can safely copy the va_list without actually processing its real components. The processing into its real components is a good chunk of what is taking too long.
>
> Any ideas on how to safely pass a varibale argument list to another thread to be processed?

no, va_list can't be safely passed (given they depend on the callers' 
stack frame, which is thread-local).

best option I know of:
read arguments from va_list into some other format (such as an array);
pass a copy of this data instead.

granted, this requires some means to know the layout of the list in 
advance (number and types of arguments), which is presumably available 
somehow?

Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

copy/pass a va_list to another thread Christopher <cpisz@austin.rr.com> - 2012-03-07 14:36 -0800
  Re: copy/pass a va_list to another thread "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-03-08 02:04 +0100
    Re: copy/pass a va_list to another thread Christopher <cpisz@austin.rr.com> - 2012-03-08 11:54 -0800
      Re: copy/pass a va_list to another thread "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-03-08 21:41 +0100
        Re: copy/pass a va_list to another thread Christopher <cpisz@austin.rr.com> - 2012-03-08 13:56 -0800
          OT: Free Usenet Access red floyd <no.spam.here@its.invalid> - 2012-03-08 16:09 -0800
            Re: OT: Free Usenet Access Christopher Pisz <someone@somewhere.net> - 2012-03-09 10:26 -0600
          New Google Groups problems (was Re: copy/pass a va_list to another thread) Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-09 12:27 +0000
          Re: copy/pass a va_list to another thread Robert Miles <milesrf@Usenet-News.net> - 2012-04-21 23:43 -0500
            XSUsenet.COM  @Jeff-Relf.Me - 2012-04-21 22:12 -0700
        Re: copy/pass a va_list to another thread Miles Bader <miles@gnu.org> - 2012-03-10 05:12 +0900
          Re: copy/pass a va_list to another thread "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-03-10 00:00 +0100
            Re: copy/pass a va_list to another thread Miles Bader <miles@gnu.org> - 2012-03-10 08:40 +0900
              Re: copy/pass a va_list to another thread Miles Bader <miles@gnu.org> - 2012-03-10 08:42 +0900
              MIME (Re: copy/pass a va_list to another thread) Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-10 07:04 +0000
                Re: MIME (Re: copy/pass a va_list to another thread) Miles Bader <miles@gnu.org> - 2012-03-10 16:56 +0900
                Re: MIME (Re: copy/pass a va_list to another thread) Gareth Owen <gwowen@gmail.com> - 2012-03-11 07:37 +0000
              Re: copy/pass a va_list to another thread "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-03-10 10:44 +0100
                Re: copy/pass a va_list to another thread Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-10 14:43 +0000
                Re: copy/pass a va_list to another thread "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-03-10 21:17 +0100
                Re: copy/pass a va_list to another thread Miles Bader <miles@gnu.org> - 2012-03-11 10:49 +0900
                Re: copy/pass a va_list to another thread Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-11 07:11 +0000
                Re: copy/pass a va_list to another thread Miles Bader <miles@gnu.org> - 2012-03-11 19:03 +0900
                Re: copy/pass a va_list to another thread Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-11 11:49 +0000
                Re: copy/pass a va_list to another thread Miles Bader <miles@gnu.org> - 2012-03-11 23:01 +0900
                Re: copy/pass a va_list to another thread "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-03-11 18:25 +0100
                Re: copy/pass a va_list to another thread Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-11 23:53 +0000
            Re: copy/pass a va_list to another thread Mike McCarty <mcmccarty@gmail.com> - 2012-03-10 05:47 -0800
              Re: copy/pass a va_list to another thread Dombo <dombo@disposable.invalid> - 2012-03-10 19:51 +0100
                Re: copy/pass a va_list to another thread "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-03-10 21:23 +0100
                Re: copy/pass a va_list to another thread Dombo <dombo@disposable.invalid> - 2012-03-11 14:36 +0100
                Re: copy/pass a va_list to another thread "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-03-11 18:33 +0100
                Re: copy/pass a va_list to another thread Dombo <dombo@disposable.invalid> - 2012-03-11 20:41 +0100
                Re: copy/pass a va_list to another thread "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-03-11 21:49 +0100
                Re: copy/pass a va_list to another thread Rui Maciel <rui.maciel@gmail.com> - 2012-03-11 17:18 +0000
                Re: copy/pass a va_list to another thread "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-03-11 18:39 +0100
                Re: copy/pass a va_list to another thread Rui Maciel <rui.maciel@gmail.com> - 2012-03-11 18:54 +0000
                Re: copy/pass a va_list to another thread Christian Gollwitzer <auriocus@gmx.de> - 2012-03-12 19:03 +0100
              Re: copy/pass a va_list to another thread Rui Maciel <rui.maciel@gmail.com> - 2012-03-11 17:09 +0000
          Re: copy/pass a va_list to another thread scott@slp53.sl.home (Scott Lurndal) - 2012-03-11 01:26 +0000
            Re: copy/pass a va_list to another thread Miles Bader <miles@gnu.org> - 2012-03-11 11:18 +0900
              Re: copy/pass a va_list to another thread scott@slp53.sl.home (Scott Lurndal) - 2012-03-11 16:41 +0000
      Re: copy/pass a va_list to another thread scott@slp53.sl.home (Scott Lurndal) - 2012-03-08 23:07 +0000
      Re: copy/pass a va_list to another thread Paavo Helde <myfirstname@osa.pri.ee> - 2012-03-08 23:17 -0600
      Re: copy/pass a va_list to another thread Stuart Redmann <DerTopper@web.de> - 2012-03-10 05:10 -0800
      Re: copy/pass a va_list to another thread 88888 Dihedral <dihedral88888@googlemail.com> - 2012-03-10 05:42 -0800
      Re: copy/pass a va_list to another thread Robert Miles <milesrf@Usenet-News.net> - 2012-04-21 23:20 -0500
  Re: copy/pass a va_list to another thread BGB <cr88192@hotmail.com> - 2012-03-08 09:25 -0700

csiph-web