summary refs log tree commit diff
path: root/synapse/util/async.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename async to async_helpers because `async` is a keyword on Python 3.7 (#3678)Amber Brown2018-08-101-415/+0
|
* Test and fix support for cancellation in LinearizerRichard van der Hoff2018-07-201-6/+22
|
* Combine Limiter and LinearizerRichard van der Hoff2018-07-201-89/+10
| | | | | Linearizer was effectively a Limiter with max_count=1, so rather than maintaining two sets of code, let's combine them.
* Improvements to the LimiterRichard van der Hoff2018-07-201-13/+20
| | | | | * give them names, to improve logging * use a deque rather than a list for efficiency
* Add a sleep to the Limiter to fix stack overflows.Richard van der Hoff2018-07-201-3/+20
| | | | Fixes #3570
* run isortAmber Brown2018-07-091-8/+10
|
* Pass around the reactor explicitly (#3385)Amber Brown2018-06-221-14/+11
|
* Remove run_on_reactor (#3395)Amber Brown2018-06-141-9/+1
|
* Merge branch 'develop' into py3-xrange-1Richard van der Hoff2018-04-301-2/+2
|\
| * Merge pull request #3140 from matrix-org/rav/use_run_in_backgroundRichard van der Hoff2018-04-301-2/+2
| |\ | | | | | | Use run_in_background in preference to preserve_fn
| | * Use run_in_background in preference to preserve_fnRichard van der Hoff2018-04-271-2/+2
| | | | | | | | | | | | | | | | | | While I was going through uses of preserve_fn for other PRs, I converted places which only use the wrapped function once to use run_in_background, to avoid creating the function object.
* | | Move more xrange to sixAdrian Tschira2018-04-281-2/+4
|/ / | | | | | | | | | | plus a bonus next() Signed-off-by: Adrian Tschira <nota@notafile.com>
* / Backport deferred.addTimeoutRichard van der Hoff2018-04-271-0/+67
|/ | | | Twisted 16.0 doesn't have addTimeout, so let's backport it.
* Remove preserve_context_over_{fn, deferred}Richard van der Hoff2017-11-141-3/+3
| | | | | Both of these functions ae known to leak logcontexts. Replace the remaining calls to them and kill them off.
* Logging and logcontext fixes for LimiterRichard van der Hoff2017-11-071-7/+17
| | | | | | | | | Add some logging to the Limiter in a similar spirit to the Linearizer, to help debug issues. Also fix a logcontext leak. Also refactor slightly to avoid throwing exceptions.
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-231-3/+3
| | | | what could possibly go wrong
* Fix logcontext handling for persist_eventsRichard van der Hoff2017-10-171-0/+5
| | | | | | | | * don't use preserve_context_over_deferred, which is known broken. * remove a redundant preserve_fn. * add/improve some comments
* Fix stackoverflow and logcontexts from linearizerRichard van der Hoff2017-10-111-2/+22
| | | | | | | 1. make it not blow out the stack when there are more than 50 things waiting for a lock. Fixes https://github.com/matrix-org/synapse/issues/2505. 2. Make it not mess up the log contexts.
* Fix logcontext handling for concurrently_executeRichard van der Hoff2017-10-061-2/+2
| | | | Avoid preserve_context_over_deferred, which is broken.
* DocsErik Johnston2017-03-301-0/+5
|
* Don't convert to deferreds when not necessaryErik Johnston2017-03-301-1/+1
|
* Add paranoia exception catch in LinearizerErik Johnston2017-01-101-2/+5
|
* More logging for the linearizer and for get_eventsMark Haines2017-01-051-2/+11
|
* s/aquire/acquire/gMark Haines2016-12-301-1/+1
|
* Add more useful logging when we block fetching eventsMark Haines2016-12-301-0/+5
|
* CommentsErik Johnston2016-11-111-0/+13
|
* Add Limiter: limit concurrent access to resourceErik Johnston2016-11-101-0/+45
|
* Preserve some logcontextsErik Johnston2016-08-241-4/+5
|
* Add ReadWriteLockErik Johnston2016-07-051-0/+82
|
* Small optimisation to CacheListDescriptorErik Johnston2016-06-031-0/+9
|
* Rename thingsErik Johnston2016-04-071-5/+5
|
* Log contexts and squash things togetherErik Johnston2016-04-071-17/+15
|
* Add commentErik Johnston2016-04-071-0/+8
|
* Deduplicate joinsErik Johnston2016-04-071-0/+42
|
* CommentErik Johnston2016-04-011-1/+1
|
* Add concurrently_execute functionErik Johnston2016-04-011-1/+31
|
* Fix up logcontextsErik Johnston2016-02-081-3/+8
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Make @cached cache deferreds rather than the deferreds' valuesErik Johnston2015-08-061-2/+7
|
* Add comment on cancellation of observersErik Johnston2015-06-191-0/+3
|
* Refactor the notifier.wait_for_events code to be clearer. Add ↵Erik Johnston2015-06-181-2/+11
| | | | _NotifierUserStream.new_listener that accpets a token to avoid races.
* Merge pull request #143 from matrix-org/erikj/SYN-375Mark Haines2015-05-121-12/+48
|\ | | | | SYN-375 - Lots of unhandled deferred exceptions.
| * Change the way we create observers to deferreds so that we don't get spammed ↵Erik Johnston2015-05-081-12/+48
| | | | | | | | by 'unhandled errors'
* | Change the way we do logging contexts so that they survive divergencesErik Johnston2015-05-081-4/+2
|/
* Implement create_observer.Erik Johnston2015-04-271-0/+19
| | | | | | `create_observer` takes a deferred and create a new deferred that *observers* the original deferred. Any callbacks added to the observing deferred will *not* affect the origin deferred.
* Update copyright noticesMark Haines2015-01-061-1/+1
|
* Fix pep8 codestyle warningsMark Haines2014-11-201-0/+2
|
* Merge branch 'develop' into request_loggingMark Haines2014-11-141-0/+6
|\ | | | | | | | | | | | | Conflicts: setup.py synapse/storage/_base.py synapse/util/async.py
| * Add a run_on_reactor functionErik Johnston2014-10-291-0/+7
| |
* | Add a request-id to each log lineMark Haines2014-10-301-1/+4
|/
* fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org ↵Matthew Hodgson2014-09-031-1/+1
| | | | hasn't been incorporated in time for launch.
* add in whitespace after copyright statements to improve legibilityMatthew Hodgson2014-08-131-0/+1
|
* Reference Matrix Home Servermatrix.org2014-08-121-0/+22