jczic / MicroWebSrv

A micro HTTP Web server that supports WebSockets, html/python language templating and routing handlers, for MicroPython (used on Pycom modules & ESP32)
https://github.com/jczic/MicroWebSrv
MIT License
640 stars 115 forks source link

No socket write when run in thread #40

Closed curlyz closed 5 years ago

curlyz commented 5 years ago

Hi , is it weird that when the Start() run in main thread , everything work , but if I do start_new_thread(Start , ()) , there seem to be no socket._write() occur ! . Is there anyway to make it async ?

jczic commented 5 years ago

Hello @curlyz, Why do you use start_new_thread for MicroWebSrv ? It's already threaded if you want. Or I don't understand ?