On 8/23/07, Mattias Gaertner <[EMAIL PROTECTED]> wrote: > On Thu, 23 Aug 2007 21:32:41 +0300 > ik <[EMAIL PROTECTED]> wrote: > > > On 8/23/07, Marco van de Voort <[EMAIL PROTECTED]> wrote: > > > > Is there an equivalent for Java's sleep and notify/notifyAll in > > > > FPC's rtl ? > > > > > > I'm sorry. I don't know Java that well. Maybe it is easier to > > > describe the exact behaviour that you want instead of drawing a > > > parallel > > > > Lets say I have synchronized threads, because I do not want to arrive > > to a race condition. > > So I want one thread to sleep as long as another thread is running... > > now "sleep" or "wait" I don't remember, sleep to infinitum unless I'm > > notifying the thread. > > Now if I have more then one thread (for example) that is looking for > > something to finish, I should need to tell every such thread to > > continue running, so I'll use notifyAll. > > Maybe you can try > > http://www.freepascal.org/docs-html/rtl/system/rtleventwaitfor.html > > If this works, you can write a small example for the wiki: > http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial
Thanks, that's what I was looking for. > Mattias Ido -- http://ik.homelinux.org/ _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal