2014-09-18 19:34 GMT+08:00 Michael Schnell <mschn...@lumino.de>: > > I think, in the other mail, I did explain how "Wait" is supposed to work > in TThreadPool. > > Initially, when the threadpool is created, Wait is hold by the main thread, so the worker just wait there, no problem, but after the worker thread get the CS, it started working, then RELEASE the CS.
This is when the problem arise: after worker release the CS, how do you ensure it is the MAIN thread who will get the CS next, NOT the worker thread again? That is my question, which I don't think you answered. Thanks, Xiangrong
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus