示例#1
0
 def testPropagatingValues(self):
     dsthread.setPropagatingThreadValue("myKey", "myValue")
     self.assertEquals(dsthread.propagatingThreadValue("myKey"), "myValue")
     def lf():
         self.assertEquals(dsthread.propagatingThreadValue("myKey"), "myValue")
         dsthread.leaveNamedSection(name="mySection")
     dsthread.blockEnterNamedSection(name="mySection")
     dsthread.newThread(lf, ())
     dsthread.blockEnterNamedSection(name="mySection")
示例#2
0
 def lf():
     self.assertEquals(dsthread.propagatingThreadValue("myKey"), "myValue")
     dsthread.leaveNamedSection(name="mySection")
示例#3
0
def threadMessageSink():
    try:
        return dsthread.propagatingThreadValue("messageSink")
    except KeyError:
        return None