diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2015-07-30 17:33:05 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2015-08-05 16:16:38 +0200 |
| commit | d718d4c5af58418cad3b6e8d7747efef66d5f801 (patch) | |
| tree | bd848d444fe64c46d7c4a9cd6d931a135fd9c791 /codegen.py | |
| parent | 40b5c82b4b0feeab28fa85c2f1855590b722fc08 (diff) | |
| download | rabbitmq-server-git-d718d4c5af58418cad3b6e8d7747efef66d5f801.tar.gz | |
Use monotonic_time() to compute elapsed time
... not `erlang:now()` (deprecated) or `os:timestamp()` (which could go
backward).
file_handle_cache:
While here, change the LRU tree key from `erlang:now()` to a
combination of the monotonic time and the handle reference (which
was the value in the tree previously). This is required as the
monotonic time doesn't increase strictly: two subsequent calls
could return the same time, leading to non-unique key. We could use
unique_integer([monotonic]) but it's a bit heavy weight just to keep
a rough order of opened files. So now, files sharing the same age
are arbitrary "sorted" by their reference.
References #233.
Diffstat (limited to 'codegen.py')
0 files changed, 0 insertions, 0 deletions
