?
Solved

Deadlock problem using AfxBeginThread

Posted on 2003-02-25
5
Medium Priority
?
368 Views
Last Modified: 2011-10-03
I have a modeless dialog that I spawn a seperate thread using m_hGThread1=AfxBeginThread(Animate_Graph,0,THREAD_PRIORITY_NORMAL,0,0,NULL) to handle the graphics seperately from the dialog. I'm using a critical section for locking. Under stress testing it deadlocks the application. Using VC7/MFC. What am I doing wrong?
0
Comment
Question by:_kp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Expert Comment

by:rde011176
ID: 8023062
Can you provide a code snippet?
0
 

Author Comment

by:_kp
ID: 8024888
I think it may be a design problem. I need to figure out how to attach to the CStatic picture control that holds the bitmap I'm modifying. Seems to hang in the message pump.
0
 
LVL 2

Expert Comment

by:bkrahmer
ID: 8031510
Think about giving test-first design a try.  I would bet that you wouldn't have gotten stuck there if you had.  It forces you to take your programming step-by-step, but correctly the whole way.  It can also be fun.  Check it out.
brian
0
 
LVL 1

Expert Comment

by:Computer101
ID: 8047895
A request for deletion has been made.  If no response or you feel this is in error, comment.  If no objection, I will delete in three days.

Computer101
E-E Admin
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8103717
PAQ'd and points refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question