Thread killing problem

C

Chris Thomasson

J.K. Baltzersen said:
news:[email protected]... [...]
My application is for checking in changes in a local database to a
central server. It has a main window. In this main window is Cancel
button. The check-in procedure is run in a thread. When the user
presses the Cancel button, I want the procedure (referred previously
to as "process") to terminate.

Your going to need to communicate with the thread running the check-in
procedure. How is the procedure structured?



Before the check-in procedure starts, I have backed up my database
files. The object that is accessed by the main process and the thread
to be ended keeps track of information needed to roll back the
database, i.e., through file copy.
When the cancel operation for the check-in procedure has completed, I
need to access the object in order to perform the rollback. This is
what fails, as when accessing one of the member variables of the
object, the debugger hangs, i.e., it never completes the simple assign
operation that involves this particular member variable.


You have a race-condition. How are managing the lifetimes of the objects,
and how are you synchronizing access to their state?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,459
Latest member
Vida00R129

Latest Threads

Top