dimanche 17 décembre 2017

Asynchronous thread

I work with Windows 10 with codeblocks and gcc 7.2 and I can use c++11 or c++14. If possible without external libraries (boost). I have a program that process hundreds of millions of fields.It´s a concept proof so I don´t need fancy error handling. I need simplicity and performance. The fields are mapped to a buffer of bits, that can reach more than 500MB, and I would like to put the management of the buffer in a isolated thread. The constructor or initialization would do the creation of a vector, the destructor or end function would write the buffer to disk with statistics and the function that will be called millions of times only make some calculus and set the bits. I need to call that function asynchronous from the main program and I don´t need return of any data. Just to set the bits and if there are erros I can read than when the processing ends if it is complex to do otherwise. The main program can be replicated in 2 or 4 threads that access the same function. I appreciate guidance for the asynchronous call of that function. Thank you.

Aucun commentaire:

Enregistrer un commentaire