I can reproduce the same error using gobject only without gtk import so
I think the upstream fix don't really solve the problem:

# -*- coding: utf-8 -*-
from gobject import threads_init, timeout_add, source_remove
import gobject
import sys

def test(iterations, use_threads):
    if use_threads:
        threads_init()
    tick = 0
    while tick < iterations:
        loop=gobject.MainLoop()
        tick += 1
        if (tick % 1000) == 0:
            print 'Tick', tick
        lasttag = timeout_add(1, loop.quit)
        loop.run()
        source_remove(lasttag)

if __name__ == "__main__":
    if sys.argv[1:] == ['no-threads']:
        threads = False
    else:
        threads = True
    print 'Using threads:', threads
    test(10000, threads)
    print 'Done.'

Using threads: True

** ERROR **: Cannot create main loop pipe: Too many open files

aborting...
Aborted

-- 
gtk_main leaks a file descriptor every time the main loop is run if threads 
have been initialized
https://bugs.launchpad.net/bugs/363245
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to