Vibe.d WebSockets crashing the thread
arakan arkino
marcosdonalonso at gmail.com
Sat Apr 20 19:24:28 UTC 2019
On Sunday, 24 March 2019 at 09:56:21 UTC, Benjamin Schaaf wrote:
> On Friday, 22 March 2019 at 23:44:58 UTC, a wrote:
>> On Friday, 22 March 2019 at 22:51:11 UTC, Sebastiaan Koppe
>> wrote:
>>> On Friday, 22 March 2019 at 20:59:33 UTC, a wrote:
>>>> On Friday, 22 March 2019 at 20:49:52 UTC, Sebastiaan Koppe
>>>> wrote:
>>>> Hm, I might have to do that. But would that explain why is
>>>> works fine for a little while before crashing?
>>>
>>> What I forgot to mention is that you are calling methods on
>>> the socket from two threads, and I dont think those methods
>>> are thread safe. Which would explain the random crashes.
>>
>> I tried getting rid of the function calls in the vibe.d
>> thread, but the crashes keep happening. Any other ideas?
>
> Not sure about WebSockets, but vibe.d often has the requirement
> that things are accessed from the same thread that created
> them. I'd try using fibers instead of threads and seeing how
> that goes.
I tried getting rid of the function calls in the vibe.d thread,
but the crashes keep happening. Any other ideas?
More information about the Digitalmars-d
mailing list