tsp icon indicating copy to clipboard operation
tsp copied to clipboard

please clarify the doc section "Threading unsupported"

Open lehenbauer opened this issue 9 years ago • 0 comments

At the bottom of https://github.com/tpoindex/tsp/blob/master/docs/runtime.md, this section reads "TSP compiled procs are not thread safe, so use of Tcl thread package must be avoided when invoking TSP compiled procs."

Since per-thread interpreters do not share objects, is it true that the thread package must be avoided when invoking TSP compiled procs?

If it is true, could you elaborate on that a bit, like when can someone use threads except when invoking compiled procs?

I think I see you are caching objects so that would crash Tcl if one thread interpreter used a cached object created by another one. Perhaps in a threaded environment only one Tcl interpreter can use a particular tsp proc?

lehenbauer avatar Jul 29 '15 07:07 lehenbauer