summaryrefslogtreecommitdiffstats
path: root/mojo/public/tools/bindings/pylib/mojom/generate/module.py
diff options
context:
space:
mode:
authoryzshen <yzshen@chromium.org>2016-02-22 17:22:10 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-23 01:23:00 +0000
commit8ef9022a0d352066587791b3e225ca264c688ade (patch)
tree099161b2828cb2e83dfb77037930a6ae68c78b8e /mojo/public/tools/bindings/pylib/mojom/generate/module.py
parent9166c9c8a3fbbd0dc74f837660ca6952a2203402 (diff)
downloadchromium_src-8ef9022a0d352066587791b3e225ca264c688ade.zip
chromium_src-8ef9022a0d352066587791b3e225ca264c688ade.tar.gz
chromium_src-8ef9022a0d352066587791b3e225ca264c688ade.tar.bz2
Reland "Mojo C++ bindings: support sync methods - part 2"
This CL introduces the correct re-entrancy behavior: when a sync call is waiting for response, allow incoming sync requests on the same thread to re-enter, async messages are queued until the sync call completes. The following will be in future CLs: - Support sync calls with associated interfaces. The original CL is at https://codereview.chromium.org/1713203002/ BUG=577699 Review URL: https://codereview.chromium.org/1723673002 Cr-Commit-Position: refs/heads/master@{#376892}
Diffstat (limited to 'mojo/public/tools/bindings/pylib/mojom/generate/module.py')
-rw-r--r--mojo/public/tools/bindings/pylib/mojom/generate/module.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/module.py b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
index 860438d..6a86f16 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/module.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
@@ -671,3 +671,10 @@ def PassesAssociatedKinds(interface):
if _ContainsAssociatedKinds(param.kind, visited_kinds):
return True
return False
+
+
+def HasSyncMethods(interface):
+ for method in interface.methods:
+ if method.sync:
+ return True
+ return False