Created
May 25, 2016 12:21
-
-
Save 72squared/c20976e7797da516acaff7d936a029c3 to your computer and use it in GitHub Desktop.
some pseudo-code for what an async api for aerospike in python might look like.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config = {'hosts': [('127.0.0.1', 3000)]} | |
client = aerospike.client(config).connect() | |
foo_future = client.put_async(('test', 'demo', 'foo'), {'bin1': 1, 'bin2': 2}) | |
bar_future = client.put_async(('test', 'demo', 'bar'), {'bin1': 1, 'bin2': 2}) | |
bazz_future = client.get_async(('test', 'demo', 'bazz')) | |
foo_future.result() | |
bar_future.result() | |
bazz_future.result() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment