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")
def lf(): self.assertEquals(dsthread.propagatingThreadValue("myKey"), "myValue") dsthread.leaveNamedSection(name="mySection")
def threadMessageSink(): try: return dsthread.propagatingThreadValue("messageSink") except KeyError: return None