Le 04/04/2018 à 14:45, Chris Angelico a écrit :
Can you give an example? Let's say we have a simple blocking C function:
int get_data() {
sleep(2);
return 42;
}
I am not saying that I understand 100% and that this is the best way,
but it works for me:
% cat get_data.c
#include
i
Le 04/04/2018 à 09:27, Steven D'Aprano a écrit :
Yes, this exactly. And if you're writing a web app, or certain kinds of
desktop apps, these seems sensible. I don't want my browser to come to a
complete halt just because some resource is taking a few seconds to
respond.
But honestly, from every
Le 16/03/2018 à 16:55, Ian Kelly a écrit :
Note that this function can't be called more than once, because it
closes the event loop at the end. Next time you call it it will get
the closed event loop and try to schedule on it and then raise an
exception because it's closed.
Ah ok.
So, if I repl
Hello,
I have recently got the need to convert a synchronous function to
asynchronous function because I needed to run three of them
concurrently. Since I am using Python 3.6, I used async def and asyncio
and that has worked out great. Thank you guys for making this possible.
Because I want
Le 06/01/2018 à 21:49, J.O. Aho a écrit :
Not just Linux, but all other OS:es, Microsoft and Apple been patching
in secret as they have a closed source approach, but ms-windows needs at
least one more patch before it can breath out, which will be released on
Tuesday.
As a matter of fact, Apple
Le 12/10/2017 à 17:57, bartc a écrit :
With a const struct, you are stopped from directly modifying elements,
but if an element is a pointer, nothing stops you writing to what the
pointer points to, unless that has a const target too. And then you've
going to have problems doing normal updates
ufficiently complex programs for it to become totally unreadable.
--
Julien Salort
Entia non sunt multiplicanda praeter necessitatem
http://www.juliensalort.org
--
https://mail.python.org/mailman/listinfo/python-list
s
> Yes, returning the class namespace is a language gaurantee.
But that says:
"Note The contents of this dictionary should not be modified; changes
may not affect the values of local and free variables used by the
interpreter."
--
Julien Salort
Entia non sunt multiplicanda
= A;
B->x = 3;
B->y = 4;
which backs indeed the C pointer analogy...
--
Julien Salort
Entia non sunt multiplicanda praeter necessitatem
http://www.juliensalort.org
--
https://mail.python.org/mailman/listinfo/python-list