.
D 2012-09-12T15:42:42
J assignee mistachkin
J cmimetype text/plain
J comment \nThe\sunix\simplementation\sof\sTcl\sthreading\ssupport\nis\sbuilt\son\sthe\spthread\slibrary,\sand\sthe\sroutine\npthread_create()\sis\sat\sthe\score\sof\sall\sTcl\sthread\ncreation\son\sunix.\n\npthread_create()\sdocuments\show\sit\smanages\sthe\ninitialization\sof\sthe\sfloating\spoint\senvironment\sin\nthe\screated\sthread:\n\n"The\s\sfloating-point\s\senvironment\s\sshall\s\sbe\sinherited\sfrom\sthe\screating\n\s\s\s\s\s\s\sthread."\n\nThis\sis\sa\svery\suseful\sdefault\sbehavior\sfor\sprograms\nperforming\smulti-threaded\scalculations,\skeeping\sall\nthreads\scomputing\sin\sa\sconsistent\sway.\n\nEmpirically,\swe\sdo\snot\ssee\sthis\sdesirable\sbehavior\nfrom\sTcl_CreateThread()\son\sWindows.\s\sIn\sparticular,\nwhen\sthe\smaster\sthread\sis\scomputing\susing\n80-bit\sextended\sprecision\scomputations,\sall\nthreads\screated\sby\sT_CT()\sdo\stheir\scomputations\nusing\sonly\sthe\sdefault\s64-bit\sprecision\soperations.\nEven\scode\sexplicitly\swritten\susing\sC\s"long\sdouble"\nvariables\sgets\sonly\s64-bit\sprecision\sfunction\swhen\nrun\sin\sa\sTcl\snon-master\sthread.\s\sThe\sconsequence\nis\sthat\scomputed\sresults\sare\snot\sportable.\n\nTcl_CreateThread()\stakes\san\sargument\sfor\sa\sthread\ninitialization\sprocedure,\sso\sthose\sprograms\sthat\scare\nabout\sthis\sdetail\shave\sthe\sability\sto\suse\sthat\sroutine\nto\sworkaround\sthis\sproblem.\s\sThe\sdisadvantage\sis\sthat\nthe\scode\sto\squery\sand\sset\sthe\sfloating\spoint\senvironment\nis\sa\snonportable\smess,\sdepending\son\shardware\sand\nOS\sand\scompiler\sand\sother\sdetails.\s\sCoding\sa\sportable\nsolution\sto\sforcing\sfp\senvironment\sinheritence\sis\sa\sbig,\nthorny\sproblem.\s\sIt's\sexactly\sthe\skind\sof\sportability\nchore\sthat\sprograms\srely\son\sthe\sTcl\slibrary\sto\ssolve\nin\sother\sscenarios.\n\nIt's\sa\stall\sorder,\sbut\sI'd\slike\sit\sif\sTcl_CreateThread()\saimed\nat\smaking\sthe\sfp\senvironment\sinheritance\sof\spthread_create()\na\scross-platform\sfeature\sas\smuch\sas\spossible.\n
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter dgp
J subsystem 49.\sThreading
J title portable\sTcl_CreateThread\sinherit\sof\sfp\ssettings
J type RFE
K 3567063fffffffffffffffffffffffffffffffff
U dgp
Z 7729863eb40a23b50a0de5901e81adc9