1

executing a function in background? Do I need threading for this? c++

view story
linux-howto

http://stackoverflow.com – I am trying to automate some data entry so I implemented a tcp client and server, the client will send file names then the server will go into a shared folder and imports that file the database. my problem is that file names could be sent at a faster rate than "importing to database". so I made a queue (which I am not sure how to set the size on it) and I push file names on the queue then execute PushToDatabase(filename); what I am trying to do is: queue<string> q; char *data = new char[1024]; ReadFromClient(data); //now 'data' has a filename q.push(data); PushToDatabase(data); // (HowTos)