<div dir="ltr">yes indeed, that will take a while to make this working.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op do 15 okt. 2020 om 10:33 schreef Răzvan Crainea <<a href="mailto:razvan@opensips.org">razvan@opensips.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">No, not fdopen, that will just open a FILE* out of a file descriptor. <br>
The async mechanism works directly with a file descriptor.<br>
I've quickly checked the lua API, and I couldn't see any mechanisms that <br>
you could use - in this case, you should probably "simulate" an external <br>
process that gets "lua jobs" and executes them asynchronously, and <br>
returns a file descriptor that can be tracked down to see the whether <br>
the exec completed. I'll have to admit, this doesn't see easy :(.<br>
<br>
Best regards,<br>
<br>
Răzvan Crainea<br>
OpenSIPS Core Developer<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a><br>
<br>
On 9/29/20 7:50 PM, johan wrote:<br>
> You refer to fdopen in Ansi C ?<br>
> <br>
> On 28/09/2020 09:43, Răzvan Crainea wrote:<br>
>> Hi, Johan!<br>
>><br>
>> Unfortunately the lua module does not support asynchronous operations.<br>
>><br>
>> TBH, I'm not that familiar with the module, so I really don't know <br>
>> exactly how it gets executed, but in order to add async support, we <br>
>> need the lua mechanism to provide us a file descriptor (or somehting <br>
>> similar) that get signaled when an operation is completed. Or at least <br>
>> provide some mechanisms to run scripts asynchronous and provide a <br>
>> callback that indicates when the script has finished.<br>
>><br>
>> Best regards,<br>
>><br>
>> Răzvan Crainea<br>
>> OpenSIPS Core Developer<br>
>> <a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a><br>
>><br>
>> On 9/25/20 11:34 AM, johan wrote:<br>
>>> does lua_exec supports async calls ?<br>
>>><br>
>>> If no, can you please indicate what needs to be added to have this <br>
>>> support ?<br>
>>><br>
>>><br>
>>> wkr,<br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Users mailing list<br>
>>> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
>>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
>><br>
>> _______________________________________________<br>
>> Users mailing list<br>
>> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
> <br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>