<p>Hi,</p>
<p>I've implemented a ringless millisecond async sleep using sorted linked list and 1 millisecond timer. Timer queues tasks that are due for execution with async_task_push.</p>
<p><a href="https://github.com/urtho/kamailio/tree/microsleep">https://github.com/urtho/kamailio/tree/microsleep</a></p>
<p>If this is worth including in the master then I can do comments, docs, better naming and millisecond async_route version.</p>
<p>Coupled with a leaky bucket algorithm (eg via HTTP microservice in GO) this gives me a nice SIP INVITE shaping functionality where I can evenly space request bursts per customer without any dropped calls. No more per customer or per group spikes or rate limit drops.</p>
<p>SIPP load testing shows now memory leaks nor other unexpected behaviour for multiple 250 req/s parallel streams.</p>

<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/issues/2006?email_source=notifications&email_token=ABO7UZPS2YQEBLNWIQZKH73P7OKFRA5CNFSM4IDR77I2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7DL6SQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNW6Z4SC2B5B4DFTPTP7OKFRANCNFSM4IDR77IQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZLBSB7R2TNTA6OL3FTP7OKFRA5CNFSM4IDR77I2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7DL6SQ.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/issues/2006?email_source=notifications\u0026email_token=ABO7UZPS2YQEBLNWIQZKH73P7OKFRA5CNFSM4IDR77I2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7DL6SQ",
"url": "https://github.com/kamailio/kamailio/issues/2006?email_source=notifications\u0026email_token=ABO7UZPS2YQEBLNWIQZKH73P7OKFRA5CNFSM4IDR77I2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7DL6SQ",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>