Author neologix
Recipients christian.heimes, hynek, jcea, neologix, pitrou, tarek, vstinner
Date 2013-08-16.16:33:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM2npW4xk=MGVY+a-phou4z0-4Xjh8-Og8m=ML3ppxq8PQ@mail.gmail.com>
In-reply-to <1376670423.39.0.597307495449.issue18756@psf.upfronthosting.co.za>
Content
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 ;-)
History
Date User Action Args
2013-08-16 16:33:19neologixsetrecipients: + neologix, jcea, pitrou, vstinner, christian.heimes, tarek, hynek
2013-08-16 16:33:19neologixlinkissue18756 messages
2013-08-16 16:33:19neologixcreate