Artifact
18c1ed8f9b851c24d3bc588e77f2742d710fc659:
Ticket change
[18c1ed8f9b]
- New ticket
[674367ffffffffff|674367ffff] <i>call for a function that is not thread safe</i>.
by
elfring on
2003-01-24 23:39:57.
D 2003-01-24T23:39:57
J assignee vasiljevic
J cmimetype text/plain
J comment I\sdescribe\san\suse\scase\sfor\sthe\shandling\sof\sunsafe\sfunctions\scalls\swith\s\nthe\sthread\spackage.\n\nI\smust\sassume\sthat\san\sapplication\s\nprogramming\sinterface\s(like\sa\sgraphics\slibrary\sor\sa\smusic\sAPI)\sor\seven\s\na\ssingle\sfunction\sis\snot\sthread\ssafe\sif\sthis\sproperty\sis\snot\sdescribed\sin\sthe\s\ndocumentation\sfor\sthat\sAPI.\nSo\sI\smust\sensure\sthat\sall\sunsafe\s\nfunctions\sare\sexecuted\sby\sa\ssingle\sthread\sat\seach\stime.\sI\swant\sto\screate\sa\s\nthread\sfor\seach\sfunction\slibrary\sthat\smust\sbe\shandled\sas\sit\shas\snot\s\nimplemented\sthread\ssafety\sat\sstartup/initialization\stime\sof\smy\s\napplication.\sI\swant\sto\sachieve\sthat\scalls\sinto\sdifferent\sunsafe\slibraries\s\ncan\sbe\sexecuted\ssimultaneously.\n\nI\scan\sperform\sthe\scall\swith\sthe\s\nfunction\s"thread::send"\sfor\sa\sthread\sthat\shas\sbeen\screated\sbefore.\sBut\sI\s\nthink\sthat\sI\swill\sneed\sa\sspecial\skind\sof\smutual\sexclusion.\sI\sunderstand\sthe\s\nthread\spackage's\sdocumentation\sin\sthe\sway\sthat\sa\smutex\sthat\sis\screated\s\nby\sthe\scommand\s"thread::mutex\screate"\sbelongs\sto\sthe\scalling\sthread.\s\nIt\smay\snot\sbe\sstored\sin\sa\sthread\sshared\svariable.\sPlease\scorrect\sme\sif\sI\s\nmake\swrong\sassumptions\shere.\n\nI\sguess\sthat\sthe\sfunction\s\n"thread::eval"\sdoes\snot\sall\swhat\sI\swant\sand\sneed\shere.\sIt\sdoes\snot\sexpect\s\na\sthread\sindentifier\sin\sits\sargument\slist.\nI\sneed\sa\smutex\sthat\sis\sglobal\sto\s\nthe\sprocess\sscope\s\n(http://citeseer.nj.nec.com/cs?cs=1&q=synchronization+and+global+and+mutex&submit=Documents&co=Expected+Citations&cm=50&cf=Any&ao=Expected+Citations&am=20&af=Any\n)\s\nto\sperform\sa\sprotected\sand\ssynchronous\scall\sof\sa\scode\spiece\sthat\s\nshould\sbe\sexecuted\sby\san\sother\sthread.\nI\swould\slike\sto\ssuggest\snew\s\nfunctions\slike\sthe\sfollowing.\n\n1.\sthread::mutex::create\s\nglobal\n\s\s\s\s\s\s\s\s\sor\n\s\s\sthread::mutex\s-global\screate\n\n2.\s\nthread::safecall\sid\sglobal_mutex\sscript\s?varname?\n\n\nHow\s\ndo\syou\sthink\sabout\sthis\ssuggestion?\nDoes\sthis\suse\scase\slead\sto\sadd\s\nmore\ssynchronization\sprimitives\sto\sthe\sthread\spackage?
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter elfring
J subsystem 80.\sThread\sPackage
J title call\sfor\sa\sfunction\sthat\sis\snot\sthread\ssafe
J type RFE
K 674367ffffffffffffffffffffffffffffffffff
U elfring
Z 2c120ea46acd6368a6e25af0d61a1704