[Libwebsockets] Using libuv threads with libwebsockets in windows
meiry242 at gmail.com
Thu May 26 08:02:08 CEST 2016
well i only what to be able to insert , wsi + user id info into hashmap ,
this is the only place i want to use mutex protection.
On Thu, May 26, 2016 at 8:43 AM, Andy Green <andy at warmcat.com> wrote:
> On 05/26/2016 01:31 PM, Meir Yanovich wrote:
>> libwebsockets is using pthreads according to test-server-pthreads.c ,
> Well, it *can* use pthreads is what you should draw from that.
> That version of the test server is showing how to do the test server
> things if you wanted to do them in pthreads. But it's optional. By
> default, lws has no pthreads code arranged to be built and no dependency on
> i dont what to install pthreads wrapper on windows .
>> so i like to use the one libuv has .
>> is it problem from libsockets point of view ?
> No, but like libuv itself, lws is designed to work out of a single
> nonblocking thread. It's not threadsafe.
> It's fine if lws + libuv are left alone in their own service thread. If
> you want to do something from another thread though, the only safe lws api
> to call is lws_callback_on_writable(), triggering the service thread to do
> whatever it is you wanted to do.
>> Libwebsockets mailing list
>> Libwebsockets at ml.libwebsockets.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libwebsockets