Thread + TclTkIp problem

Ask you a question

To call in Ruby third party TCL function library, that there should be inside the after+vwait operation, waiting for some state. Because the TCL function library TBC cannot have access to the source code.

Ruby call model is as follows:

t1 = Thread.new {
#The timing query operation Ruby, every 10s minutes a call...

}

t2 = Thread.new {
interp = TclTkIp.new
interp._eval {The TCL function library...}

}

No mutual communication type of operation between T1 and T2

But running up to find thread operations in T1 seems to be starved to death, has been in operation T2

The thread scheduler Ruby is non preemptive? Why T1 can't to the time slice?

Please a lot of advice, thanks!

Started by Derek at November 10, 2016 - 10:46 AM

Have not thought about running a secondary T1 more than 10s? Time to tune into 10min

Posted by Matilda at November 16, 2016 - 10:48 AM

Mistake. That T2 would starve to death!

Posted by Matilda at November 20, 2016 - 11:14 AM