Vibe.d WebSockets crashing the thread
a
email at example.edu
Fri Mar 22 20:59:33 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.
Hm, I might have to do that. But would that explain why is works
fine for a little while before crashing?
More information about the Digitalmars-d
mailing list