You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.
Due to the asynchronous nature of KeyValueStore which uses callbacks, there are difficulties with organizing and structuring code that fetches multiple keys at once or certain keys in sequence. We can write simpler and more readable code with a synchronous option that would end up looking like this:
CreateThread(function()
local value1 = KeyValueStore:Get({key = "Key1", synchronous = true})
local value2 = KeyValueStore:Get({key = "Key2", synchronous = true})
if value1 > value2 then
print("my code looks so pretty!")
end
end)
Note: This requires refactoring KVS:Get to use single arg table instead of positional args
The text was updated successfully, but these errors were encountered:
Due to the asynchronous nature of KeyValueStore which uses callbacks, there are difficulties with organizing and structuring code that fetches multiple keys at once or certain keys in sequence. We can write simpler and more readable code with a synchronous option that would end up looking like this:
Note: This requires refactoring KVS:Get to use single arg table instead of positional args
The text was updated successfully, but these errors were encountered: