[gnet-dev] GNet async DNS take uhhh... 3?
- From: David Helder <dhelder umich edu>
- To: gnet-dev gnetlibrary org
- Subject: [gnet-dev] GNet async DNS take uhhh... 3?
- Date: Mon, 13 May 2002 17:17:38 -0400 (EDT)
I found a bug in the pthread implementation of the async DNS code.
The problem was that I thought if you wrote to a closed pipe you got an
error on the first write and SIGPIPE on the second, just like with
sockets. But this isn't the case, you get the SIGPIPE on the first bad
write. This is ok for the fork implementation - the child just crashes on
SIGPIPE - but not in the pthread implementation - the main process
crashes.
So I rewrote the pthread implementation. It doesn't use a pipe. When the
thread succeeds, it creates a GSource which then will call the callback
when the main loop runs again. If it's cancelled, the thread is allowed
to run to completion.
I think I have this working ok. I still need to verify the dispatch is
being done in the main thread.
There will be a new release by the end of the week, since I need the fix
for new Emcast and Jungle Monkey releases.
David
--
__ _ __ David Helder - dhelder umich edu
___/ /__ __ __(_)__/ / <http://www.eecs.umich.edu/~dhelder>
/ _ / _ `/ |/ / / _ / Jungle Monkey: <http://www.junglemonkey.net>
|_,_/|_,_/|___/_/|_,_/ Paper CD Case: <http://www.papercdcase.com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]