emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asynchronous DNS


From: Alain Schneble
Subject: Re: Asynchronous DNS
Date: Tue, 9 Feb 2016 10:15:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt)

Lars Ingebrigtsen <address@hidden> writes:

> Andreas Schwab <address@hidden> writes:
>
>> Alain Schneble <address@hidden> writes:
>>
>>> True, but my assumption was that it would be illegal to call
>>> `accept-process-output' say, for example, from within
>>> `set-process-coding-system' for the sake of waiting for the DNS resolve
>>> to complete as it might have unwanted side effects.
>>
>> You have to wait for the completion event in some way.
>
> Yeah, these blockers would basically have to be a version of this thing
> from `send_process':
>
>  while (! new_function_that_says_the_process_is_ready (proc)) 
>   wait_reading_process_output (0, 20 * 1000 * 1000, 0, 0, Qnil, NULL, 0);
>
> I think.  Which is what send_process does on EWOULDBLOCK.

Ok, now I see, thanks to both of you.  In the example above, wait_proc
is NULL.  Shall it be set to the process to wait for in a "real"
implementation?  Together with passing a sigevent struct to
getaddrinfo_a, so the process gets signaled?  Currently, this signaling
is not used, as it polls for completion.  I hope I'm not mixing things
up...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]