Re: vwait doesn't return after setting TCL_SetVar from a thread
- From: David Gravereaux <davygrvy@xxxxxxxxx>
- Date: Sat, 28 Apr 2007 11:50:25 -0700
Ziv Haziz wrote:
two last questions...
1. if i will use the thread package in the tcl level i will need to do
TCL_ThreadQueue instead of TCL_queue right? how could i tell whay will
be the relevant Q? how to make sure that the event will go to the
relevant thread?
The man page explains the difference. Tcl_ThreadQueueEvent queues new events to
the particular thread in the params. Tcl_QueueEvent queues to the current thread
the function is being called from. Tcl_ThreadQueueEvent only exists when the core
you are using has been compiled for thread support.
2. in your code you have wrapped the TCLEvent pointer with additional
data (TCL_interp pointer) this is your code:
DataReadyEvent *evPtr
.
.
.
Tcl_QueueEvent((Tcl_Event *)evPtr
when i tried to pass similar pointer (with the following structure) with
the same casting.
typedef struct {
Tcl_Event* header;
Tcl_Interp *interp;
TCL_Var2Set Var2set;
} EventData;
the tclsh crushed - if you could elaborate how your conversion was
accepted by the tclsh.
The 'header' should not be a pointer. Should be:
typedef struct {
Tcl_Event header;
Tcl_Interp *interp;
Tcl_Var2Set Var2set;
} EventData;
--
Calvin: Sometimes when I'm talking, my words can't keep up with my thoughts.
I wonder why we think faster than we speak. Hobbes: Probably so we can think
twice.
Attachment:
signature.asc
Description: OpenPGP digital signature
- References:
- vwait doesn't return after setting TCL_SetVar from a thread
- From: zivh@xxxxxxxxx
- Re: vwait doesn't return after setting TCL_SetVar from a thread
- From: David Gravereaux
- Re: vwait doesn't return after setting TCL_SetVar from a thread
- From: David Gravereaux
- vwait doesn't return after setting TCL_SetVar from a thread
- Prev by Date: Re: vwait doesn't return after setting TCL_SetVar from a thread
- Next by Date: Re: Trying to do a simple time command for procs...can't get output into console...
- Previous by thread: Re: vwait doesn't return after setting TCL_SetVar from a thread
- Next by thread: using combobox in tktable
- Index(es):
Relevant Pages
|