Skip to content

Commit 341ddb9

Browse files
author
Paul Jones
committed
Also check for a nowait field on synchronous records
1 parent 493a176 commit 341ddb9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

codegen.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ def genMethodHasContent(m):
119119
print "method_has_content(%s) -> %s;" % (m.erlangName(), str(m.hasContent).lower())
120120

121121
def genMethodIsSynchronous(m):
122-
print "is_method_synchronous(%s) -> %s;" % (m.erlangName(), str(m.isSynchronous).lower())
122+
hasNoWait = "nowait" in fieldNameList(m.arguments)
123+
if m.isSynchronous and hasNoWait:
124+
print "is_method_synchronous(#%s{nowait = NoWait}) -> not(NoWait);" % (m.erlangName())
125+
else:
126+
print "is_method_synchronous(#%s{}) -> %s;" % (m.erlangName(), str(m.isSynchronous).lower())
123127

124128
def genMethodFieldTypes(m):
125129
"""Not currently used - may be useful in future?"""

0 commit comments

Comments
 (0)