Re: link list & thread

2009-11-08 Thread Ian Lance Taylor
Mohsen Pahlevanzadeh writes: > I have a thread & 2 func.flush_2_db() is in thread & add_element() is > outside of thread. > add_element's job is adding data to link list.& flush_2_db()'s job is > reading list & drop from list.But my problem is override data & lost > data, because flush_2_db is in

link list & thread

2009-11-08 Thread Mohsen Pahlevanzadeh
Dear all, I have a thread & 2 func.flush_2_db() is in thread & add_element() is outside of thread. add_element's job is adding data to link list.& flush_2_db()'s job is reading list & drop from list.But my problem is override data & lost data, because flush_2_db is in the thread & both work parall