(no title)
vhost- | 6 years ago
func get_value(key):
value = backend.get(key)
return value
Is way better than something along these lines: func get_value(key):
while true:
response = backend.get(key)
if response.type == "promise":
sleep duration
continue
return response.value
If your service looks like the former, then suddenly your unit tests can use a postgres database, a sqlite database, a rest client... that all implement the same backend.get(key) interface.
No comments yet.