Multiple main loops




I'm writing a gui wrapper around my currently command-line-interface only
program and am having a problem with more than one library wanting to be
the 'main loop'. Specifically, I'm using the readline library for the CLI
and then I'm also using gtk for the gui api. Each requires complete
control of the process. I thought I had solved this problem with pthreads.
In other words, I have a main pthread that spawns two child threads and
runs the gtk loop in one and the readline loop in the other. It sorta
works. However, 1) It always SEGVs when it exits and 2) It occasional gets
X, gdk, and/or shmem errors. 


This subject was brought up a few weeks ago, but unfortunately the archive
is currently down...

Any suggestions?

Scott




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]