#1506840 testcase - directors with virtual extended methods

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9327 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-09-23 00:00:58 +00:00
commit e028f34060
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,20 @@
# Test case from bug #1506850
#"When threading is enabled, the interpreter will infinitely wait on a mutex the second
#time this type of extended method is called. Attached is an example
#program that waits on the mutex to be unlocked."
from director_extend import *
class MyObject(SpObject):
def __init__(self):
SpObject.__init__(self)
return
def getFoo(self):
return 123
m = MyObject()
if m.dummy() != 666:
raise RuntimeError, "1st call"
if m.dummy() != 666: # Locked system
raise RuntimeError, "2nd call"