From: Gary K. <gr...@re...> - 2006-08-21 05:26:58
|
Mark Doliner wrote: > People on gaim-commits may already be familiar with this... > > Previously there were three different methods used to resolve IP addresses in > Gaim. We chose a different method at compile time based on your OS. They all > used either getaddrinfo() or gethostbyname(). The differences lie in how they > achieved non-blockingness. > > In Unix-land we forked a process to do the lookup, then waited for the process > to send us the results. In Windows-land we spawned a thread and did the > lookup there. In anything else we used a very bland implementation which > blocked the UI. > > It seemed dumb to me to have three implementations of the same thing, so I got > rid of the Unix one and the other one and now we're using only the > thread-based lookup. > > Ethan didn't like this (I think because it uses threads?), but his reasons > didn't really convince me. How do other people feel? It's pretty easy to > revert my change and go back to having lots of crazy and confusing code, if > people want. > > -Mark Why do we need a thread? Can't we use a watcher or listener in our main loop? -- Gary Kramlich <gr...@re...> |