[ENet-discuss] ENet-discuss Digest, Vol 119, Issue 4
Andy Zheng
zxz3121 at gmail.com
Fri May 3 17:22:48 PDT 2013
I just give up the enet_host_flush and
shorten the delay of enet_host_service to 20ms ,all sending and reception
just by itself
在 2013-5-4 上午3:00, <enet-discuss-request at cubik.org>写道:
> Send ENet-discuss mailing list submissions to
> enet-discuss at cubik.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.cubik.org/mailman/listinfo/enet-discuss
> or, via email, send a message with subject or body 'help' to
> enet-discuss-request at cubik.org
>
> You can reach the person managing the list at
> enet-discuss-owner at cubik.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ENet-discuss digest..."
>
>
> Today's Topics:
>
> 1. dangerous about function enet_host_flush (zxz3121 at gmail.com)
> 2. Re: dangerous about function enet_host_flush (Ruud van Gaal)
> 3. Re: dangerous about function enet_host_flush (Syed Setia Pernama)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 3 May 2013 17:49:59 +0800
> From: "zxz3121 at gmail.com" <zxz3121 at gmail.com>
> To: enet-discuss <enet-discuss at cubik.org>
> Subject: [ENet-discuss] dangerous about function enet_host_flush
> Message-ID: <201305031749569964678 at gmail.com>
> Content-Type: text/plain; charset="gb2312"
>
>
> when I use two different threads for receive package and send package I
> found that when I use enet_host_flush in send thread may occur Thread
> synchronization problem randomly, because enet_host_flush and
> enet_host_service may call the enet_protocol_send_outgoing_commands
> function at the sametime?even I use the pthread_mutex_t in my threads
> it`s crash randomly anyway!
>
>
> zxz3121 at gmail.com
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.cubik.org/pipermail/enet-discuss/attachments/20130503/a1d4d2d6/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Fri, 3 May 2013 12:43:18 +0200
> From: Ruud van Gaal <ruud at racer.nl>
> To: zxz3121 <zxz3121 at gmail.com>, Discussion of the ENet library
> <enet-discuss at cubik.org>
> Subject: Re: [ENet-discuss] dangerous about function enet_host_flush
> Message-ID:
> <
> CADULfbMjcuyvfjWwOT2MU475FvMPO9V5XANSHaYXLBDPjMYBmQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> ENet isn't thread-safe, as you found out.
>
>
> On Fri, May 3, 2013 at 11:49 AM, zxz3121 at gmail.com <zxz3121 at gmail.com
> >wrote:
>
> > **
> >
> > when I use two different threads for receive package and send package I
> > found that when I use enet_host_flush in send thread may occur
> > Thread synchronization problem randomly, because enet_host_flush and
> > enet_host_service may call the enet_protocol_send_outgoing_commands
> > function at the sametime?even I use the pthread_mutex_t in my threads
> > it`s crash randomly anyway!
> > ------------------------------
> > zxz3121 at gmail.com
> >
> > _______________________________________________
> > ENet-discuss mailing list
> > ENet-discuss at cubik.org
> > http://lists.cubik.org/mailman/listinfo/enet-discuss
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.cubik.org/pipermail/enet-discuss/attachments/20130503/6e09c2f1/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Fri, 3 May 2013 04:52:39 -0700 (PDT)
> From: Syed Setia Pernama <syedhs at yahoo.com>
> To: Discussion of the ENet library <enet-discuss at cubik.org>
> Subject: Re: [ENet-discuss] dangerous about function enet_host_flush
> Message-ID:
> <1367581959.99748.YahooMailNeo at web125702.mail.ne1.yahoo.com>
> Content-Type: text/plain; charset="utf-8"
>
> Provide two queues, one is for sending and another is for packet
> receiption. Both queues must have thread safety.
>
>
>
> ________________________________
> From: Ruud van Gaal <ruud at racer.nl>
> To: zxz3121 <zxz3121 at gmail.com>; Discussion of the ENet library <
> enet-discuss at cubik.org>
> Sent: Friday, May 3, 2013 6:43 PM
> Subject: Re: [ENet-discuss] dangerous about function enet_host_flush
>
>
>
> ENet isn't thread-safe, as you found out.
>
>
>
>
> On Fri, May 3, 2013 at 11:49 AM, zxz3121 at gmail.com <zxz3121 at gmail.com>
> wrote:
>
>
> >?
> >when I use?two different?threads for receive package and send
> package? I found that when I use enet_host_flush in send thread may occur
> Thread?synchronization??problem? randomly, because
> enet_host_flush? and enet_host_service may? call the?
> enet_protocol_send_outgoing_commands? function? at the sametime?even I
> use the pthread_mutex_t? in my threads it`s crash randomly anyway!
> >________________________________
> >zxz3121 at gmail.com
> >_______________________________________________
> >ENet-discuss mailing list
> >ENet-discuss at cubik.org
> >http://lists.cubik.org/mailman/listinfo/enet-discuss
> >
> >
>
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.cubik.org/pipermail/enet-discuss/attachments/20130503/f0e8a722/attachment-0001.html
> >
>
> ------------------------------
>
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>
>
> End of ENet-discuss Digest, Vol 119, Issue 4
> ********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20130504/6d64311b/attachment.html>
More information about the ENet-discuss
mailing list