[whatwg] Thread to run Web Socket feedback from the protocol ?

Jonas Sicking jonas at sicking.cc
Wed Dec 9 10:06:04 PST 2009


On Wed, Dec 9, 2009 at 9:53 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Wed, 9 Dec 2009, Jonas Sicking wrote:
>> On Wed, Dec 9, 2009 at 9:34 AM, Ian Hickson <ian at hixie.ch> wrote:
>> > On Wed, 9 Dec 2009, Alexey Proskuryakov wrote:
>> >>
>> >> Data from network is only processed as an event loop task
>> >
>> > I do not believe this is accurate. It certainly isn't what is specced.
>>
>> In XMLHttpRequest this is certainly accurate. You will never see
>> .responseText changing in the middle of an execution thread, it's
>> always changed in response of a task run from the event loop.
>
> Sure. From the spec's point of view, a task is queued by the background
> network thread to update the responseText attribute. (I haven't checked if
> that's how Anne actually specced it, but something to that effect is
> needed, otherwise you can see the attribute changing from under you in a
> running script.)
>
> I'm absolutely fine with changing WebSocket to change readyState as part
> of the same task that dispatches the event

Yes, that is what I think the spec should say.

/ Jonas



More information about the whatwg mailing list