Re: Multiple main loops
- From: Owen Taylor <otaylor redhat com>
- To: Scott Dattalo <sdattalo unix sri com>
- Cc: gtk-list redhat com
- Subject: Re: Multiple main loops
- Date: 18 Jun 1999 16:52:49 -0400
Scott Dattalo <sdattalo@unix.sri.com> writes:
> 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.
Instead of trying to answer the questions about threads,
etc, let me point out that you can make readline()
use the GTK+ main loop.
See rl_callback_handler_install() in the readline documentation.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]