Hi Patrick, Sorry for send mail repeated first. Yes, you're right ! I run zookeeper on windows platform .
Compiler is VC 2010. And I usinng zookeeper version 3.4.3. The following configuration I used in zookeeper server. tickTime=2000 initLimit=10 syncLimit=5 dataDir=Server3/data dataLogDir=Server3/dataLog clientPort=2183 server.1=127.0.0.1:2888:3888 server.2=127.0.0.1:2889:3889 server.3=127.0.0.1:2890:3890 Attach file is the log I set zoo_set_debug_level(ZOO_LOG_LEVEL_DEBUG);. Thanks Patrick Hunt <ph...@apache.org> 於 2012年3月18日下午1:02 寫道: > Hi Justyanzi, > > You saw my response on March 6th? (perhaps you didn't subscribe to the > list prior to this?) > > See: http://markmail.org/message/xvovco2yf77n6ooq > > Patrick > > On Fri, Mar 16, 2012 at 9:39 PM, Justyanzi Lin <justya...@gmail.com> > wrote: > > I using zookeeper C API. And I modify cli.c let it only run a for-loop. > > > > the loop as below > > > > while(1) { > > zh = zookeeper_init(hostPort, watcher, 30000, &myid, 0, 0); > > Sleep(1000); > > zookeeper_close(zh); > > } > > > > And I found every time execute zookeeper_close(zh), will leave 2 thread > > handles. I suppose that thread handle will the same or not increase every > > time. > > > > It seems not correct. > > > > I use WinDbg tool to watch the process and found > > first stop > > 156 Handles > > Type Count > > None 2 > > Event 15 > > File 2 > > Directory 3 > > Mutant 1 > > WindowStation 2 > > Semaphore 2 > > Key 6 > > Thread 121 > > Desktop 1 > > IoCompletion 1 > > > > second stop > > 193 Handles > > Type Count > > None 2 > > Event 17 > > File 2 > > Directory 3 > > Mutant 1 > > WindowStation 2 > > Semaphore 2 > > Key 6 > > Thread 156 > > Desktop 1 > > IoCompletion 1 > > > > Is there something I using wrong? > > > > Thanks >