How to translate the following sync pseudo code into async js code
result = []
for pid in r.smembers('active_prog'):
for prog_obj in r.hgetall("prog:" + pid):
for item_obj in r.hgetall("item:" + prog_obj['iid']):
prog_obj['items'].append(item_obj)
result.append(prog_obj)
return result
That's seems natural in sync programming:
I've tried using MULTI but it seem doesn't work when the recursion goes deeper.
Is there any recommendation for learning programming in async paradigm?(preferably in js code rather than .net stuff)
Is there any recommendation for learning programming in async paradigm?
Try to look at these:
In order to prevent deeply nested callbacks in your code you can take advantage of several flow control node.js modules such as:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With