Delphi中的线程类--之(5,大结局)[1]

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

本文简介:选择自 raptor 的 blog

delphi中的线程类

 

猛禽[mental studio]

http://mental.mentsu.com

 

之五(大结局)

回到前面checksynchronize,见下面的代码:

function checksynchronize(timeout: integer = 0): boolean;

var

  syncproc: psyncproc;

  localsynclist: tlist;

begin

  if getcurrentthreadid <> mainthreadid then

    raise ethread.createresfmt(@schecksynchronizeerror, [getcurrentthreadid]);

  if timeout > 0 then

    waitforsyncevent(timeout)

  else

    resetsyncevent;

  localsynclist := nil;

  entercriticalsection(threadlock);

  try

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

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

go top