Threads problem
- From: Ricky <www homail com localhost localdomain>
- To: gtk-list gnome org
- Subject: Threads problem
- Date: Mon, 7 Jan 2002 17:19:29 +0800
Hi all,
I have this problem regarding threads. In a popup widget, I have attached
the callback below to one of the buttons. If successful, it will run the
"else" part of the codes. In the "runServer ( )" routine, I will call two
threads to run a tcp_server and a udp_server module both of which are polling
continuous for incoming connections. The problem is that when I pressed the
button when everything is OK (i.e it jumps to the "else" part), my
application will get stuck at that window.
The threads are causing problem but I do not know how to solve this. Can
anybody help?
void
onTM_port_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *tm_window, *pop;
tm_window = create_tm_end_window ();
if ((tcp_lport < 5000 || udp_lport < 5000) || (tcp_lport == udp_lport))
{
pop = create_popup ();
gtk_widget_show (pop);
}else{
gtk_widget_show (tm_window);
gtk_widget_destroy (user_data);
runServer(tcp_lport, udp_lport);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]