Vibe.d WebSockets crashing the thread

Sebastiaan Koppe mail at skoppe.eu
Fri Mar 22 20:49:52 UTC 2019


On Friday, 22 March 2019 at 20:23:05 UTC, a wrote:
> Here is some minimal code that reproduces the issue:
> source/app.d:
> http://dpaste.com/2QCSXC1
>
> and public/index.html:
> http://dpaste.com/02QANJY
>
> I would really appreciate if anyone could help me fix this.
> Thanks!

I don't think it is safe to pass a vibe-d Websocket to another 
thread. It might very well insist on staying on the thread it is 
created from.

Instead you could do all reading in the handler function and then 
only pass the (immutable) data to another thread.



More information about the Digitalmars-d mailing list