From: Andreas K. <and...@ac...> - 2012-11-21 20:09:44
|
On Wed, Nov 21, 2012 at 11:41 AM, Jeff Rogers <dv...@di...> wrote: > Donal K. Fellows wrote: > >> If I was to work on improving threading, I'd be just looking at how to >> make inter-thread messaging cheaper. It's got to be possible to avoid >> dragging *everything* through strings... > > thread::tsv already does this to an extent: > > * Sv_DuplicateObj -- > * > * Create and return a new object that is (mostly) a duplicate of the > * argument object. We take care that the duplicate object is either > * a proper object copy, i.e. w/o hidden references to original object > * elements or a plain string object, i.e one w/o internal representation. > > Could this functionality be pulled into the core threading code? This code seems to have a hardwired set of obj-types it can copy properly, be it shallow or deep (special register functions, used only for list). Everything else is forced through strings still, albeit wrapped into a Tcl_Obj*. Like dicts. My idea was to have the necessary function as part of the Tcl_ObjType, so that there is no central hardwired list, and so that user-specified custom ObjTypes can make use of it also. -- Andreas Kupries Senior Tcl Developer Code to Cloud: Smarter, Safer, Faster™ P: 778.786.1122 F: 778.786.1133 and...@ac... http://www.activestate.com Learn about Stackato for Private PaaS: http://www.activestate.com/stackato Tcl'2013, Sep 23-27, New Orleans, LA, USA. |