diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-09-18 10:03:51 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2017-09-18 11:54:39 +0200 |
| commit | f1a85ba70a2412fb0d7bf789a758d8f2d2e86a02 (patch) | |
| tree | e6e8d2142a12d75c8943b07c192f88ecd3ddf527 /addons/web/static/src/js/core/concurrency.js | |
| parent | 313f69e9487e991e4db33c75682342b185da5c73 (diff) | |
[FIX] *: fix a bunch of incorrectly documented docstring
Fix a bunch of ill-documented/incomplete/incorrect method docs
Without this, the automatic doc generation does not work.
Diffstat (limited to 'addons/web/static/src/js/core/concurrency.js')
| -rw-r--r-- | addons/web/static/src/js/core/concurrency.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/addons/web/static/src/js/core/concurrency.js b/addons/web/static/src/js/core/concurrency.js index cab9df6529e..aeef29809d9 100644 --- a/addons/web/static/src/js/core/concurrency.js +++ b/addons/web/static/src/js/core/concurrency.js @@ -122,7 +122,7 @@ return { * the last operation. * * For example, let us say that we have a _fetch method on a widget which - * fetches data. We want to rerender the widget after. We could do this: + * fetches data. We want to rerender the widget after. We could do this:: * * this._fetch().then(function (result) { * self.state = result; @@ -130,17 +130,18 @@ return { * }); * * Now, we have at least two problems: + * * - if this code is called twice and the second _fetch completes before the * first, the end state will be the result of the first _fetch, which is * not what we expect * - in any cases, the user interface will rerender twice, which is bad. * - * Now, if we have a DropPrevious: + * Now, if we have a DropPrevious:: * * this.dropPrevious = new DropPrevious(); * * Then we can wrap the _fetch in a DropPrevious and have the expected - * result: + * result:: * * this.dropPrevious * .add(this._fetch()) @@ -153,7 +154,7 @@ return { /** * Registers a new deferred and rejects the previous one * - * @param {Deferred} the new deferred + * @param {Deferred} deferred the new deferred * @returns {Promise} */ add: function (deferred) { @@ -171,7 +172,7 @@ return { * * Imagine that we have a function to fetch some data _load(), which returns * a deferred which resolves to something useful. Now, we have some code - * looking like this: + * looking like this:: * * return this._load().then(function (result) { * this.state = result; @@ -179,11 +180,11 @@ return { * * If this code is run twice, but the second execution ends before the * first, then the final state will be the result of the first call to - * _load. However, if we have a mutex: + * _load. However, if we have a mutex:: * * this.mutex = new Mutex(); * - * and if we wrap the calls to _load in a mutex: + * and if we wrap the calls to _load in a mutex:: * * return this.mutex.exec(function() { * return this._load().then(function (result) { |
