Kill gthreads



Hello!
I am developing a filesharing client and want to make
some dns lookups with the gethostbyname() function.
I don't want to freeze the application while doing
this and i belive the best way to resolve the ips
with gethostbyname is to create a thread by using the
g_thread-library.

My problem is that I want to kill the thread if the
dns lookup takes to long time or the user cancels
the connection attempt, and I cant find a way
to do this.

Is it impossible to kill the g-thread? If it is, do
anyone have a better way to solve the dns lookup?

Thanks
Johan Nilsson



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]