W3C home > Mailing lists > Public > public-device-apis-log@w3.org > May 2017

Re: [sensors] Use simple event dispatch mechanism instead of task source (queued)

From: Tobie Langel via GitHub <sysbot+gh@w3.org>
Date: Fri, 26 May 2017 17:05:34 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-304336373-1495818332-sysbot+gh@w3.org>
> Shared buffer is internal implementation detail and internal slot, good implementation would treat it this way. External behavior must be same regardless of implementation details. 

Well, I agree. But good spec works makes sure that it is spec'ed properly.

> Thus, in chromium, if shared buffer is updated in the middle of the script, it will not be observable on JS side,

Yeah, I'm not suggesting your implementation has issues. Just that the spec isn't clear about that and that, according to the thread mentioned above, using a task (on the spec side) is the way to handle this.

> e.g., sensor.reading === sensor.reading should be respected.

Well, it's a concurrency issue, so `sensor.reading === sensor.reading` could very well return true most of the time.

> That's why @pozdnyakov is fixing it in #210, to sync spec with agreement we made.

Could you point me to where in the spec this is fixed. I fail to see how anything in that PR fixes it (which doesn't mean it's not fixed, just I fail to see it).

> Was there a time when we had issue just about one thing 😃 ?

😂  😂  😂 

> you asked on irc about other specs, you might want to check IDB, WebSockets and if I remember correctly MediaStream interface.

Not sure what the consensus about WebSockets is nowadays (but it's a pretty old spec), but I don't think either IDB or MediaStream has a good reputation in terms of being properly spec'ed.

> We have mixed model :D 

Yeah—I know. The backstory is that I added @anssiko's work in there to meet a deadline, knowing very well we'd have to tackle the task issue heads on at some point. Hence the inline issue on the topic I added later. Technical debt.  

GitHub Notification of comment by tobie
Please view or discuss this issue at https://github.com/w3c/sensors/issues/215#issuecomment-304336373 using your GitHub account
Received on Friday, 26 May 2017 17:05:41 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:54 UTC