3 ms·
Did they remove the global interpreter lock? And if not, how can the language be used for high concurrency (ala Facebooks tornado).
by tomjen3 16y ago
Did they remove the global interpreter lock?
And if not, how can the language be used for high concurrency (ala Facebooks tornado).
- troutwine 16y agoIn short: epoll. Network IO bound servers need only deal with sockets that have some event ready. Unless I'm mistaken, Tornado isn't written to be highly concurrent, it is, rather, quite asynchronous: they make it very simple to deal with IO only when there is data to process. You _can_ block the whole process with a long lived handler.
- rbanffy 16y ago> You _can_ block the whole process with a long lived handler. Or you could handle the event out-of-process.
- troutwine 16y agoQuite so.I made my statement more to dissuade the notion that Tornado was in any way a magic concurrency machine, that, ultimately, careful programming is still required.
- rbanffy 16y ago+1. Out-of-process handling is no silver bullet either. Careful programming is, but it's a skillfully handcrafted bullet, made from the most exotic materials in addition to its silvery base and that kills only the specific problem it was designed to kill. Getting rid of the GIL would be like having a machine gun for mass-produced silver bullets.
- frognibble 16y agoTornado achieves concurrency using async network IO and multiple instances per core.