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


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

Re: Write to file in 8 places simultaneously

From Bonita Montero <Bonita.Montero@gmail.com>
Newsgroups comp.lang.c++
Subject Re: Write to file in 8 places simultaneously
Date 2020-01-03 13:41 +0100
Organization albasani.net
Message-ID <quncpp$bee$1@news.albasani.net> (permalink)
References <24817930-f8d6-4237-8c4b-b30a75f03b27@googlegroups.com>

Show all headers | View raw


> 	std::thread *ptrs_threads[g_amount_threads];
> 	for (unsigned i = 0; i != g_amount_threads; ++i)
> 	{
> 		ptrs_threads[i] = new std::thread(Thread_Entry_Point_Set_Memory,i);
> 	}

Use
         vector<thread> threads( g_amount_threads ).
         for( thread &t : threads )
             t = move( thread( threadFn, params ) );

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


Thread

Write to file in 8 places simultaneously Frederick Gotham <cauldwell.thomas@gmail.com> - 2020-01-02 01:46 -0800
  Re: Write to file in 8 places simultaneously Paavo Helde <myfirstname@osa.pri.ee> - 2020-01-02 12:46 +0200
    Re: Write to file in 8 places simultaneously Frederick Gotham <cauldwell.thomas@gmail.com> - 2020-01-02 03:34 -0800
      Re: Write to file in 8 places simultaneously Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-01-03 10:57 +0000
  Re: Write to file in 8 places simultaneously Frederick Gotham <cauldwell.thomas@gmail.com> - 2020-01-02 03:32 -0800
  Re: Write to file in 8 places simultaneously Bonita Montero <Bonita.Montero@gmail.com> - 2020-01-03 13:41 +0100

csiph-web