KeyboardInterrupt swallowed somewhere

Issue #210 resolved
Former user created an issue

import psycopg2 as psycopg from sqlalchemy import pool psycopg = pool.manage(psycopg, use_threadlocal=False, timeout=None, pool_size=1, max_overflow=0) c1 = psycopg.connect('dbname=mozy host=db user=bds') c2 = psycopg.connect('dbname=mozy host=db user=bds') as expected KeyboardInterrupt is ignored

(also, if KeyboardInterrupt is getting swallowed, SystemExit might be too.)

Comments (1)

  1. Mike Bayer repo owner

    this problem appears to be within the Queue.Queue module.

    in this program, ctrl-C wont break the blocking call on line 3 (but ctrl-\ will kill it)

    import Queue
    q = Queue.Queue(1)
    q.get(True, None)
    print "hi"
    

    in this test, where there is a timeout (which defaults to 30 in SQLAlchemy's pool), ctrl-C does seem to work:

    import Queue
    q = Queue.Queue(1)
    q.get(True, 10)
    print "hi"
    
  2. Log in to comment