Click here to Skip to main content
15,905,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CSockets Error Pin
shiraztk13-Sep-04 22:17
shiraztk13-Sep-04 22:17 
QuestionHow to send user defined structure via PostMessage Pin
ledallam13-Sep-04 21:04
ledallam13-Sep-04 21:04 
AnswerRe: How to send user defined structure via PostMessage Pin
Arsalan Malik13-Sep-04 21:20
Arsalan Malik13-Sep-04 21:20 
GeneralRe: How to send user defined structure via PostMessage Pin
ledallam13-Sep-04 21:37
ledallam13-Sep-04 21:37 
GeneralRe: How to send user defined structure via PostMessage Pin
Arsalan Malik13-Sep-04 21:45
Arsalan Malik13-Sep-04 21:45 
GeneralRe: How to send user defined structure via PostMessage Pin
Mad__13-Sep-04 23:22
Mad__13-Sep-04 23:22 
GeneralRe: How to send user defined structure via PostMessage Pin
Roger Allen14-Sep-04 12:24
Roger Allen14-Sep-04 12:24 
GeneralAccessing data between threads Pin
ledallam13-Sep-04 19:30
ledallam13-Sep-04 19:30 
--------------------------------------------------------------------------------

Hello,

I am writing an application which uses two threads.
I have a list<int> variable in my Document class.
THREAD 1
In this thread, I am filling a list from back i.e pDoc->list.insert(list.begin(),data);
THREAD 2
In this thread, I am extracting each element from top of the list, and displaying it on the UserInterface i.e
data = pDoc->list.pop_front();
Display(data);

THREAD1 cotinously reads and adds data at the bottom of the list while THREAD 2 gets data from the top of the list and displays it.

Can I directly access the list memeber available in my document class as above in the two threads.
When I tried the above, it worked fine when the list had limited number say 10 to 30 records, but as the size of list was growing to say 10,000 records the program was crashing.

Can anyone please help me to solve this ?

Thanks
Madhavi
GeneralRe: Accessing data between threads Pin
Arsalan Malik13-Sep-04 19:38
Arsalan Malik13-Sep-04 19:38 
GeneralRe: Accessing data between threads Pin
Hardy_Smith13-Sep-04 21:40
Hardy_Smith13-Sep-04 21:40 
GeneralHandling multiple instances of an application in VC++ 6.0 Pin
Neeranjan13-Sep-04 19:07
Neeranjan13-Sep-04 19:07 
GeneralRe: Handling multiple instances of an application in VC++ 6.0 Pin
Arsalan Malik13-Sep-04 19:24
Arsalan Malik13-Sep-04 19:24 
GeneralRe: Handling multiple instances of an application in VC++ 6.0 Pin
Neeranjan13-Sep-04 19:40
Neeranjan13-Sep-04 19:40 
GeneralRe: Handling multiple instances of an application in VC++ 6.0 Pin
Anonymous14-Sep-04 0:47
Anonymous14-Sep-04 0:47 
GeneralRe: Handling multiple instances of an application in VC++ 6.0 Pin
lookforme_prash14-Sep-04 0:52
lookforme_prash14-Sep-04 0:52 
GeneralRe: Handling multiple instances of an application in VC++ 6.0 Pin
Neeranjan14-Sep-04 18:46
Neeranjan14-Sep-04 18:46 
GeneralRe: Handling multiple instances of an application in VC++ 6.0 Pin
lookforme_prash14-Sep-04 19:58
lookforme_prash14-Sep-04 19:58 
GeneralRe: Handling multiple instances of an application in VC++ 6.0 Pin
Neeranjan14-Sep-04 20:16
Neeranjan14-Sep-04 20:16 
GeneralRe: Handling multiple instances of an application in VC++ 6.0 Pin
lookforme_prash14-Sep-04 20:22
lookforme_prash14-Sep-04 20:22 
GeneralRe: Handling multiple instances of an application in VC++ 6.0 Pin
Neeranjan14-Sep-04 20:48
Neeranjan14-Sep-04 20:48 
GeneralWin32 Pin
wow999913-Sep-04 17:40
wow999913-Sep-04 17:40 
GeneralRe: Win32 Pin
PJ Arends13-Sep-04 18:21
professionalPJ Arends13-Sep-04 18:21 
GeneralCom port enable Pin
anuchelvi13-Sep-04 17:10
anuchelvi13-Sep-04 17:10 
GeneralRe: Com port enable in menu bar Pin
anuchelvi13-Sep-04 21:12
anuchelvi13-Sep-04 21:12 
GeneralRe: Com port enable in menu bar Pin
shiraztk13-Sep-04 21:31
shiraztk13-Sep-04 21:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.