Delphi中的线程类--之(4)[7]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 raptor 的 blog

    try

      entercriticalsection(threadlock);

      try

        if synclist = nil then

          synclist := tlist.create;

        syncproc.syncrec := asyncrec;

        synclist.add(@syncproc);

        signalsyncevent;

        if assigned(wakemainthread) then

          wakemainthread(syncproc.syncrec.fthread);

        leavecriticalsection(threadlock);

        try

          waitforsingleobject(syncproc.signal, infinite);

        finally

          entercriticalsection(threadlock);

        end;

      finally

本文关键:Thread Event CriticalSection Synchronize
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top