I am trying to make a python script that uses the multiprocessing module to produce 2 (or more) GTK windows. I am hitting a wall here it seems. Here is the code and the errors I am getting:
p1 = Process(target=tiny_gtk_process, name="process 1")
p1.start()
p2 = Process(target=tiny_gtk_process, name="process 2")
p2.start()
and:
def tiny_gtk_process():
import gtk
window = gtk.Window()
window.set_size_request(800,600)
window.show_all()
gtk.main()
Most of the time I am getting:
multiwin.py: Fatal IO error 0 (Success) on X server :0.0. python: ../../src/xcb_io.c:249: process_responses: Assertion `(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)' failed.
Sometimes I get:
multiwin.py: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.
Is the issue the gtk loop? Doesn't multiprocessing isolate them?
Any ideas would be very helpful.