Message195353
2013/8/16, Tarek Ziadé <report@bugs.python.org>:
> I use greenlets. But, I don't know - are you suggesting os.urandom() should
> be marked in the documentation as "DOES NOT SCALE" and I should use another
> API ? Which one ?
Well, even with greenlets, I assume you're using at least one FD
(socket) per client, no?
So you can get EMFILE on socket() just as on os.urandom(). The only
difference is that sockets are long-lived, whereas os.urandom() only
opens a FD for a couple ms. So os.urandom() isn't your biggest problem
here.
I'd suggest you to just open '/dev/urandom' once, and then make all
your threads/green-threads read from it.
IMO os.urandom() is a really poor API ;-) |
|
Date |
User |
Action |
Args |
2013-08-16 16:33:19 | neologix | set | recipients:
+ neologix, jcea, pitrou, vstinner, christian.heimes, tarek, hynek |
2013-08-16 16:33:19 | neologix | link | issue18756 messages |
2013-08-16 16:33:19 | neologix | create | |
|