Hi,

I found another solution, actually more like a hack that simulates
non-blocking behavior. I use Tcl_DoWhenIdle to call a procedure and then
reschedule the procedure using Tcl_CreateTimerHandler but I don't think is
the best solution so I'll make a little more research. What do you think?

Do you know if there is a way to set all event processing for Tk to be
non-blocking without specifying this to Tcl_DoOneEvent by passing the
TCL_DONT_WAIT flag? I've tried to find an answer but I couldn't find
anything relevant.

I still think another solution is needed.  Bwish is going to go away.
>  Putting code into bwish will make it even harder for it to go away without
> breaking your new Qt interface.
>

This is true.  When moving the main loop for the new Qt interface to work
Tcl_DoOneEvent(TCL_DONT_WAIT) is necessary but I don't think this will make
removing bwish a problem.


> What about adding it to src/libtclcad/tclcad.c:Tclcad_Init() instead?
>  That should get run when "package require Tclcad" is run, which will be
> before nearly everything.
>

I don't think it can be moved or better said it isn't something that has to
be moved. Since the call to Tcl_DoOneEvent is in Cad_MainLoop in bwish and
the problem is that it blocks so it has to be changed to be non-blocking.
In the actual form I don't think it's possible to have a blocking tcl/tk
event processing since when a Qt event occurs, the corresponding Tk one is
generated. Being blocked in waiting for Tk events means being blocked in
processing Qt ones which means being blocked in generating Tk which is not
good.

Cheers,
Vlad
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to