Re: [gnet-dev] am i wrong? gnet_io_channel_readline
- From: David Helder <dhelder gizmolabs org>
- To: richard_III gmx net
- Cc: gnet-dev lists gnetlibrary org
- Subject: Re: [gnet-dev] am i wrong? gnet_io_channel_readline
- Date: 12 Jul 2004 10:58:14 -0400
Sounds like the broken glib poll() bug (see BUGS). Do you have more
than one watch on any iochannel?
David
On Mon, 2004-07-12 at 04:34, richard_III gmx net wrote:
> i'd like to write a server using gnet. the server does read what the client
> types by using gnet_io_channel_readline or gnet_io_channel_readline_strdup.
> both of those methodes are working. the problem is, the cpu usage is to
> much. if i have 0 clients connected the useage is correctly by 0% for this
> process. if i have 1 client connected the useg increases up to 50% for the
> 2nd client up to 99%.
>
> the following code runs in a thread-methode.
>
> \/
> guint bytes_read;
> gchar* rbuffer;
>
> while (true)
> {
> bytes_read = 0;
>
> gnet_io_channel_readline_strdup (m_pCh,&rbuffer,&bytes_read);
> }
> /\
>
> any idea what i did wrong?
> thanks
> richard
>
> _______________________________________________
> gnet-dev mailing list
> gnet-dev lists gnetlibrary org
> http://lists.gnetlibrary.org/mailman/listinfo/gnet-dev
--
David Helder - dhelder gizmolabs org - http://www.gizmolabs.org/~dhelder
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]