Vibe.d WebSockets crashing the thread

a email at example.edu
Fri Mar 22 21:00:22 UTC 2019


On Friday, 22 March 2019 at 20:49:52 UTC, Sebastiaan Koppe wrote:
> 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.

Also, sending data _to_ the websocket from the 2nd thread works 
fine.


More information about the Digitalmars-d mailing list