If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
A queue of jobs / threads
Hi I have a situation where jobs comes in from several computers adding, updating or deleting items in a vector these jobs are done by threads, but very fast and they are synchronized with the main thread at the point where they update the vector. Each time the vector is updated I must save the data to disk and I do so in a thread, the saving is very slow compared to the other jobs, so there might very well be a bunch of saving threads waiting for file access and only the last one will end up saving an updated vector. I would of course like to only run the last thread, so my question is what is the normal way to deal with this situation ?? Thanks in advance Best regards Asger |
Ads |
#2
|
|||
|
|||
A queue of jobs / threads
Very sorry, wrong NG again.... |
Thread Tools | |
Display Modes | Rate This Thread |
|
|