Lines Matching refs:obj
18 def __init__(self, obj):
19 self.obj = obj
26 lck = objc.object_lock(self.obj)
31 if self.obj.isLocked():
32 self.obj.appendToList_("LOCK FOUND")
34 self.obj.setLocked_(True)
35 self.obj.appendToList_("thread %d a"%(i,))
37 self.obj.appendToList_("thread %d b"%(i,))
38 self.obj.setLocked_(False)
44 def __init__(self, obj):
45 self.obj = obj
53 native.threadFunc_(self.obj)
84 obj = BaseClass.alloc().initWithList_(lst)
85 lck = objc.object_lock(obj)
87 thr = OtherThread(obj)
92 self.assertFalse(obj.isLocked())
93 obj.setLocked_(True)
94 obj.appendToList_("mainthread")
95 obj.setLocked_(False)
109 obj = BaseClass.alloc().initWithList_(lst)
110 lck = objc.object_lock(obj)
112 thr = ObjCThread(obj)
117 self.assertFalse(obj.isLocked())
118 obj.setLocked_(True)
119 obj.appendToList_("mainthread")
121 obj.setLocked_(False)
143 obj = BaseClass.alloc().initWithList_(lst)
145 thr = OtherThread(obj)
149 with objc.object_lock(obj):
150 self.assertFalse(obj.isLocked())
151 obj.setLocked_(True)
152 obj.appendToList_("mainthread")
154 obj.setLocked_(False)