i have incoported lib into my app. The application has may thread and many
service. LibUV is used to realise the RPC service and the start of this
service is done within the main sequence that start several service. So the
uv_run can't block the flow of service initialization. To achieve this i
put the uv_run within a thread method
and when i need i call uv_tcp_connect with the loop to start the client.
Il giorno venerdì 4 luglio 2014 17:01:12 UTC+2, Saúl Ibarra Corretgé ha
scritto:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 07/04/2014 04:57 PM, Claudio Bisegni wrote:
> > Another question, i create my loop and, when i need to send
> > something so server i allocate che client. For this reason i have a
> > thread method with:
> >
> > while(run) {
> >
> > uv_run(loop, UV_RUN_NOWAIT);
> >
> > usleep(100);
> >
> > }
> >
> >
> > is the right way to use this run mode?
> >
>
> No. Also, what do you mean by "a thread method"? Note than uv_run is
> not thread-safe.
>
>
> - --
> Saúl Ibarra Corretgé
> bettercallsaghul.com
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: Using GnuPG with Icedove - http://www.enigmail.net/
>
> iQIcBAEBAgAGBQJTtsF0AAoJEEEOVVOum8BZAWYQAIuMz0416yCHgU9bhr45kCC4
> m8i96X/n/sSDH3oOH4D+V0HZHmDYvH7moRtJoBE1Gr9ibj526PXGStWM+wCQXtCA
> kLy1iMVH7Ecwquz0lRHqlVd7HSD+UEsW5uDohLN3MlZD/kVWRhP/gEqgFSd0F4N4
> NXW4+lv5fY36jTCTZZDO3RYiFlOv1++eL3FVrsgX6dDF/a4M0PeptmCjdfZfLPPQ
> DNV++S/pqnL4KEAPRv3EhA35AD0gd74D9z2d7BCFW/D1Ogl3uvk2l8FqA7UKFcA+
> WoqqrVz3jtxUo/3qSFnIQnc6Do3lxYzcL/YgD5G5gG7Ck7AIdidkCp8TjZLpmGfx
> tGn0+oCf4WmNgRXmediBO7txV5P86ULZWBnik3OBgRlt0FTBcJADIlDoOO3A+LUt
> HigSK8gHlXwtLQ+Z76azJ63HufRei3VTw082qJVQBzU7cuX8R7vZtOR722qG6z40
> 2sbLdcgldXC1FkbH2bPXHQNk1xHAPLGIz32wbZUvYxWlvh/lRuTjPNzRVK4FqiDP
> IzdCEB4plsQ36TB9S9IWzwuOqkmOBpgeDgQ9kJTOKoVr75MwvRhHgc2A34GpgmTZ
> Ot/BhJcOrhuxNhv0aC+HacyntF4tAtiOGzK0U1mFIdAEar4XTHoKqcI5tVTTGmVr
> NuDM6puec2dVS0FHGvCn
> =MNeS
> -----END PGP SIGNATURE-----
>
--
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.