[Glade-users] Threading with GTK/Glade
- From: james cameron compaq com (James Cameron)
- Subject: [Glade-users] Threading with GTK/Glade
- Date: Mon, 26 Feb 2001 14:30:22 +1100
Johnathan Vail wrote:
Does anyone who has done something similar with Gtk have any ideas or
suggestions?
Just brute-force lock it. Before making any GTK+ or Glade call, or
modification to any data structure that is owned by GTK+ or Glade, take
out a lock that prevents any other thread in your application from doing
the same thing. Take care not to keep the lock.
It sounds like you have pre-existing code that constrains your design.
You will not end up with the optimum event driven solution, therefore.
I would probably split the process into two ... change your Linux curses
threaded program to deliver the data to an interprocess pipe (ipc shmem,
ipc message queue, network socket or mknod pipe) that is then read and
processed sequentially by the GUI.
The GUI would fork() and exec() the multi-channel reader process.
--
James Cameron (cameron stl dec com)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]