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

Future API fixes #1245

Merged
merged 15 commits into from Mar 16, 2017

Conversation

@sergeuz
Copy link
Member

commented Feb 3, 2017

This PR introduces the following changes:

  • isSucceeded(), isFailed(), result() and error() methods of Future<T> now synchronously wait until an operation is completed.
  • Future<T> now can be implicitly (and synchronously) converted to T.
  • Particle.publish() now returns Future<bool> and can be used in a backward-compatible way.
  • HAL_Timer_Milliseconds() overflow is now properly handled when checking for expired ACK handlers (WITH_ACK flag functionality).
  • Added CompletionHandlerList class that can be used to invoke several completion handlers at once (@avtolstoy).
  • Renamed system's Promise class to SystemPromise to avoid conflicts with application's Promise in the global namespace.
  • Code size optimizations and unit tests.

Doneness:

  • Contributor has signed CLA
  • Problem and Solution clearly stated
  • Code peer reviewed
  • API tests compiled
  • Run unit/integration/application tests on device
  • Add documentation
  • Add to CHANGELOG.md after merging (add links to docs and issues)

Features

  • [PR #1245] Particle.publish() now able to use Future API
sergeuz added 11 commits Jan 21, 2017
Decouple CompletionHandlerMap from HAL; handle HAL_Timer_Milliseconds…
…() overflow; minor refactoring; more unit tests
Futures API refactoring: result(), error(), isSucceeded() and isFaile…
…d() methods now wait until future is completed; few more convenience methods and conversion operators; minor renamings

@sergeuz sergeuz added this to the 0.7.0 milestone Feb 3, 2017

@technobly technobly added the feature label Feb 9, 2017

@m-mcgowan m-mcgowan self-requested a review Mar 1, 2017

@avtolstoy avtolstoy referenced this pull request Mar 6, 2017
7 of 7 tasks complete
technobly added 2 commits Mar 15, 2017
Merge branch 'develop' into fix/futures
 Conflicts:
	wiring/inc/spark_wiring_cloud.h
	wiring/src/spark_wiring_cloud.cpp

@technobly technobly removed the request for review from m-mcgowan Mar 16, 2017

@technobly technobly merged commit 677a36a into develop Mar 16, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@technobly technobly deleted the fix/futures branch Mar 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.