[Libwebsockets] must LWS_MAX_SMP=1 in WINDOWS platform ???

Andy Green andy at warmcat.com
Mon Aug 3 20:45:47 CEST 2020



On 8/3/20 6:22 PM, 李寒松 wrote:
> I have a question to ask you.
> 
> I saw version 3.2.3 , CMakeLists.txt

Old versions are not going to have the best stuff.

> if (WIN32)
> set(LWS_MAX_SMP 1)
> set(LWS_WITH_THREADPOOL 0)
> endif()
> 
> I have imported "pthreads-w32" library, can i transform LWS_MAX_SMP > 1?
> I need develop websocket server,high-concurrency.

There are a few different things mixed up there.

On lws master, to make Sai work on windows, I enabled support for 
pthreads and for lws_spawn and threadpool and use those myself.  So 
those things are supposed to work OK on windows on master.  I wrote up 
the details, including which pthreads to use, here:

https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.build-windows.md

MAX_SMP > 1 I did not test on windows.  I think if you have pthreads, it 
may work more or less the same as Linux.  But YMMV.

-Andy

> Looking forward to your reply.
> 
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> https://libwebsockets.org/mailman/listinfo/libwebsockets
> 


More information about the Libwebsockets mailing list