summaryrefslogtreecommitdiff
path: root/eventlet/tpool.py
Commit message (Collapse)AuthorAgeFilesLines
* tpool: Windows compatibility, fix ResourceWarning. Thanks to Victor StinnerSergey Shepelev2014-12-011-1/+2
| | | | | | https://github.com/eventlet/eventlet/pull/167 Signal socket bind to 127.0.0.1, '' does not work on Windows sock.close() to fix ResourceWarning with python3 -Wd
* PEP-8 fixesSergey Shepelev2014-08-271-0/+1
|
* greenio, tpool: python3 compatibilitySergey Shepelev2014-07-181-53/+33
| | | | | | | Also: - PEP-8 - check both EAGAIN/EWOULDBLOCK - use system implementation of GreenPipe.readinto()
* PEP8 whitespaceSergey Shepelev2014-06-121-0/+1
|
* python3 compatibilitySergey Shepelev2014-04-241-19/+43
| | | | | | | | | | | | - __next__ for iterator interface - six.next() to get next item - list(dict.keys()) - popen2.popen4 -> subprocess - s2b -> b"..." literals - deprecated assertEquals -> assertEqual - hub_test test_fork using run_python - 1L -> 1 long literal - many PEP-8 fixes
* Python3: __bool__, im_code, im_funcVictor Sergeyev2014-04-241-0/+1
|
* python3 compat fixesVictor Sergeyev2014-03-281-8/+11
| | | | https://github.com/eventlet/eventlet/pull/59
* tpool: proxy __enter__, __exit__ fixes BB-158; Thanks to Eric UrbanSergey Shepelev2013-10-021-6/+10
| | | | https://bitbucket.org/eventlet/eventlet/issue/158/eventlet-pooled-psycopg2-connections-wont
* tpool: clear up some references that prevent garbage collectionEdward George2013-06-041-2/+2
| | | | https://github.com/eventlet/eventlet/pull/33
* tpool: single request queueEdward George2013-06-031-21/+11
| | | | https://bitbucket.org/eventlet/eventlet/pull-request/32/use-single-request-queue-for-threadpool
* Added missing global var, and added nose test for set_num_threadsDavid Ibarra2012-11-021-0/+1
|
* Added set_num_threads method to set the number of tpool threads ↵David Ibarra2012-11-021-0/+3
| | | | programmatically. (Without environment variables)
* Timeouts get porpagated out of tpool.execute.Ryan Williams2011-04-121-3/+6
|
* Clearer behavior in the case of zero-size tpools.Ryan Williams2010-11-061-4/+9
|
* Fixing hang when importing a module that makes a tpooled MySQLdb connection, ↵Ryan Williams2010-10-081-1/+4
| | | | thanks to mikepk for getting to the bottom of this. Still needs a unit test.
* Removed superfluous esend method, pyevent skip for yet another tpool test, durr.Ryan Williams2010-10-031-7/+4
|
* Greenlet affinity for tpool threads. This means that if you make multiple ↵Ryan Williams2010-09-281-39/+42
| | | | tpool calls with the same greenthread, they will all go through the same real thread.
* Adding assertion checking for negative pool size in tpool, per discussion ↵Ryan Williams2010-09-121-0/+1
| | | | with rtyler. Also a test because I am a test nerd.
* tpool.Proxy now wraps functions. Improved impolementations of equality and ↵Ryan Williams2010-06-211-3/+9
| | | | iteration in tpool as well.
* Named tpool threads, fixed rare race condition where _reqq would be freed ↵Ryan Williams2010-06-021-2/+5
| | | | before the thread got to it, causing log spam. Consolidated all patcher/tpool tests in one place.
* Tpool should use original thread-specific Queue instead of possibly-patched one.Ryan Williams2010-06-021-2/+3
|
* Fix to get restore tpool on Windows.Ryan Williams2010-05-071-1/+1
|
* Reimplemented GreenPipe without using file object.amajorek2010-03-301-5/+2
| | | | | | | | file.write is not returning number of bytes writen and partial writes were not handled properly. New implementation is using os module calls which support partial writes. It also implements missing calls from file object (like seek, tell, truncate, ...). The later is not very usefull, because regular files never return EAGAIN. New GreenPipe can be constructed from int, string or file object.
* Improved implentation of iterators in tpool; thanks to SlantRyan Williams2010-03-171-2/+7
|
* py3k - corrections for deprecation warnings reported by python2.6 -3.amajorek2010-03-091-1/+3
| | | | | | | - integer division - repr instead of ` Added __hash__ to speedy Proxy funtions - 3.x requires __hash__ if __eq__ is defined. Found problem with comparing two proxy objects.
* Merge with latest which_linden tipamajorek2010-03-051-1/+3
|\
| * It turns out that __iter__ is one of those magical methods, too. Now tpool ↵Ryan Williams2010-03-041-1/+3
| | | | | | | | supports proxying iterators.
* | py3k - more changes.amajorek2010-03-041-6/+8
|/ | | | | | | | - sys.exc_clear does not exist in 3.x - objects are not comparable by default in in 3.x. Timer needs to have __lt__ operator to be used by heapq. - callable is gone in 3.x. - tpool communication pipe changed to exchange binary data. It makes current GreenPipe work in 3.x. It is also faster and have less translation layers. - 3.x socket uses bytes not str class. Used s2b to make tests working on both.
* py3k - 3.x file object returned by socket.makefile does not allow writes if ↵amajorek2010-02-281-1/+1
| | | | | | it was open for reading. Also write to closed file raises exception immediately - it used to raise exception on flush.
* Merge with latest which_linden tipamajorek2010-02-261-13/+22
|\
| * added comment/suggestion about potential memory leakTavis Rudd2010-02-241-7/+11
| |
| * Bug 21: Make tpool reentrantChris AtLee2010-02-221-6/+11
| |
* | first draft of making eventlet py3k compatible.amajorek2010-02-261-1/+1
|/ | | | | | | | | | - __import__ used to import system modules in places where local module with the same name exist. - GreenSocket.timeout private member renamed to _timeout. It is R/O property in 3.x socket.socket object. - Calls to GreensSocket.timeout changed to call gettimeout to isolate clients from GreenSocket internals. - GreenSocket access to unknown attributes will be forwarded to fd member. i.e. py3k has _io_refs property not needed in 2.x version - get_errno moved to eventlet/greenio.py to be accessible to every place where testing socket.error.errno is needed - Modified tests to use makefile with mode='w' where data was written. 3.x does not allow to write to file opened for reading. - socket._fileobject class does not exist in 3.x. It will be emulated with _fileobject function. Also moved definition from eventlet.green.socket to eventlet.grreenio.
* Improved support for monkeypatching by eliminating race conditions in ↵Ryan Williams2010-02-171-1/+2
| | | | eventlet's own imports of patched modules.
* Extended tpool's autowrap functionality to use the name of the attribute, ↵Ryan Williams2010-02-061-13/+27
| | | | which is a lot cleaner than type-checking (which is still supported). Added psycopg tests to db_pool tests.
* Fixed bug in tpool.killall, also another slight bug in the pollhub, and ↵Ryan Williams2010-01-181-3/+2
| | | | added a new test verification method which will work on every hub but pyevent.
* Cleaned up link implementation in greenthread, added greenthread test ↵Ryan Williams2010-01-181-1/+1
| | | | module, fixed kill's implementation to resolve the race condition.
* Moved Event to its own module. More cycle-breaking!Ryan Williams2010-01-171-1/+2
|
* Removed deprecation warnings from tpool_test.py, more cleanup in killall and ↵Ryan Williams2010-01-151-2/+3
| | | | setup.
* Converted tpool to use newer APIs, improved cleanup and tests some more.Ryan Williams2010-01-151-6/+11
|
* Slightly improved setup/killall, and added debugging to tpool tests.Ryan Williams2010-01-141-5/+9
|
* Automated merge with http://bitbucket.org/which_linden/eventlet/Ryan Williams2010-01-081-8/+7
|\
| * Set tpool to be quiet by default, improved exception raising.Ryan Williams2010-01-051-8/+7
| |
* | More doc cleanup. Removed timer module from docs because it's an internal ↵Ryan Williams2009-12-311-10/+28
|/ | | | detail.
* Renamed coros.event to coros.Event to be compatible with PEP-8 some more.Ryan Williams2009-12-161-1/+1
|
* Removed previously-deprecated features tcp_server, GreenSSL, erpc, and ↵Ryan Williams2009-12-151-6/+0
| | | | trap_errors.
* Tpool tests now pass on Windows!Ryan Williams2009-12-071-7/+6
|
* Renamed GreenFile to Green_fileobject, better reflecting its purpose. This ↵Ryan Williams2009-12-051-1/+1
| | | | is kind of a documentation fix for #6.
* Deprecated erpc like the TODO saidRyan Williams2009-12-041-3/+5
|
* Windows compatibility for tpool as requested by rtyler. Not yet tested on ↵Ryan Williams2009-11-111-10/+28
| | | | Windows!