i have a program which is using several threads to execute some task. Each thread is having a bunch of task to execute. after executing one of them, each thred will call a post
Instead of posting messages, you can put messages in a thread safe queue.
In your main thread, use a timer event to drain the queue.
To remain responsive though, do not stay in the timer event too long.
In many cases I have found this better than posting messages.
In Delphi XE there is a class called TThreadedQueue which you can use.
Edit :
I uploaded a sample sort application utilizing different thread to GUI techniques.
See ThreadedQueueDemo