Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is a Promise-returning, "oneshot" method useful? #49

Closed
tobie opened this issue Jun 11, 2015 · 3 comments
Closed

Is a Promise-returning, "oneshot" method useful? #49

tobie opened this issue Jun 11, 2015 · 3 comments

Comments

@tobie
Copy link
Member

tobie commented Jun 11, 2015

This would be spec'ed along the lines of:

partial interface Sensor {
  Promise<SensorReading> oneshot(SensorInit sensorInitDic);
}

Useful when only a single reading is necessary (e.g. for certain geoloc usecases).

Rather easy to implement in JS on top of the existing primitives, but might enable some performance gains that would be unavailable otherwise.

@rwaldron
Copy link
Contributor

I'd rather see how often this actually happens in practice, then iterate accordingly.

@tobie
Copy link
Member Author

tobie commented Jun 11, 2015

Agreed. Seems Geolocation requires it (cc @gmandyam, @timvolodine).

@tobie
Copy link
Member Author

tobie commented Oct 16, 2015

Seems from the use cases this is a requirement. Added it back to the spec. Closing.

@tobie tobie closed this as completed Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants