Hello Jason,

I'm afraid it is quite hard to say, what exactly is happening here without
taking a look at the surrounding code.

Could you please try to obtain a stack trace of the EXC_BAD_ACCESS that you
are getting?

Generally, one loop should be enough for all purposes!

Cheers,
Fedor.


On Thu, Jun 5, 2014 at 11:11 PM, Jason W <[email protected]> wrote:

> Hello, I develop a small program that has the following two things.
>
> 1. tcp server that and uses a queue to queue up client connections
>
> 2. make use of pipe to read events from usb
>
>
> Once an event is triggered by usb, the idea is to notify all the tcp
> clients in the queue.  The connected tcp clients can receive the message
> being published by the server with the following code on the server side
> BUT my on_write function just keep getting called like inifite loop.
>
>
> uv_write(&request, stream, &buf, nbufs, on_write);
>
>
> However if I change the above code w/ the following, I will get error
> Thread 1:EXC_BAD_ACCESS (code=EX_i386_GPFLT)
>
>
>
>         int byteWritten = uv_try_write(theStrPoint, &buf, nbufs);
>
>
>
> I only use the default loop and wonder whether I should create another
> loop for the above 2 pipe thing?
>
> My env is Mac using xcode and libuv version 0.11.25, could that also be
> the unstable thing?  Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "libuv" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/libuv.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to