State Machine
Managing multiple-threaded application is quite tricky.. I spent a lot of time trying to do this and I ended up with an idea of a solution which is based on my previous experience designing hardware on an FPGA, using a state machine which is running on another thread and publishing the state to all the application.
The state machine controls all the thread activity inside the application and all the running thread must send a message to the state machine to change the state. Therefore the state machine acts as the manager of all the threads and by doing so we can control the activity of the threads.
I don't know the correct way of doing such thing, does anybody knows? however, this solution works for me..
Labels: borland c++ builder, coding, multithread, work
2 Comments:
i dont understand all these stuffs, anyway, try your best ^^
By nguyen hoai nam, at June 30, 2009 at 3:14 AM
I use the same way as yours, Jimbong tought me that way and i haven't got any other way. Diko
By Anonymous, at October 26, 2009 at 10:55 PM
Post a Comment
<< Home