<h4>Type Of Change</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> New feature (non-breaking change which adds new functionality)</li>
</ul>
<h4>Checklist:</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> PR should be backported to stable branches</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Tested changes locally</li>
</ul>
<h4>Description</h4>
<ul>
<li>new ms_timer parameter to enable millisecond precision timer</li>
<li>new async_ms_route and async_ms_sleep functions with milliseconds as a param</li>
<li>implementation:<br>
Each async_ms_sleep adds an entry to a linked list sorted by expiry time.<br>
List is checked every ms_timer ms for expired entries.<br>
All expired entries are pushed for execution on a pool of async workers.</li>
</ul>
<p>This allows easy implementation of request traffic shaping with an external leaky bucket microservice<br>
Assuring a maximum rate with no dropped requests by introducing delay.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/2016'>https://github.com/kamailio/kamailio/pull/2016</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>async: added support for millisecond resolution sleep</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2016/files#diff-0">src/modules/async/async_mod.c</a>
    (134)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2016/files#diff-1">src/modules/async/async_sleep.c</a>
    (210)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2016/files#diff-2">src/modules/async/async_sleep.h</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2016/files#diff-3">src/modules/async/doc/async_admin.xml</a>
    (113)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/2016.patch'>https://github.com/kamailio/kamailio/pull/2016.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/2016.diff'>https://github.com/kamailio/kamailio/pull/2016.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2016?email_source=notifications&email_token=ABO7UZMJTR46EDQRGWG7CPTQBS4HNA5CNFSM4IHKWVP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HB3YR2A">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLDHMJFROCKOVE247TQBS4HNANCNFSM4IHKWVPQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZLYKPXEJBQDRQLZWXLQBS4HNA5CNFSM4IHKWVP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HB3YR2A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2016?email_source=notifications\u0026email_token=ABO7UZMJTR46EDQRGWG7CPTQBS4HNA5CNFSM4IHKWVP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HB3YR2A",
"url": "https://github.com/kamailio/kamailio/pull/2016?email_source=notifications\u0026email_token=ABO7UZMJTR46EDQRGWG7CPTQBS4HNA5CNFSM4IHKWVP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HB3YR2A",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>