diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-10 16:49:58 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-10 16:49:58 +0200 |
commit | ae582acdb1bfb3fb4171682b884545d174e95aa9 (patch) | |
tree | b0c9c0b14f6d57cd8ce1c14d4d23df1adb0bc539 /src/lanes.lua | |
parent | 3f5c16116a3a7740ac4ac62b663661d772543c2e (diff) | |
download | lanes-ae582acdb1bfb3fb4171682b884545d174e95aa9.tar.gz lanes-ae582acdb1bfb3fb4171682b884545d174e95aa9.tar.bz2 lanes-ae582acdb1bfb3fb4171682b884545d174e95aa9.zip |
linda:send() returns nil,<something> in case of error
Diffstat (limited to 'src/lanes.lua')
-rw-r--r-- | src/lanes.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lanes.lua b/src/lanes.lua index 95c4eff..92e773a 100644 --- a/src/lanes.lua +++ b/src/lanes.lua | |||
@@ -728,7 +728,8 @@ local genatomic = function(linda_, key_, initial_val_) | |||
728 | return function(diff_) | 728 | return function(diff_) |
729 | -- 'nil' allows 'key_' to be numeric | 729 | -- 'nil' allows 'key_' to be numeric |
730 | -- suspends until our 'true' is in | 730 | -- suspends until our 'true' is in |
731 | if linda_:send(nil, key_, true) == cancel_error then | 731 | local _res, _err = linda_:send(nil, key_, true) |
732 | if _err == cancel_error then | ||
732 | return cancel_error | 733 | return cancel_error |
733 | end | 734 | end |
734 | local val = linda_:get(key_) | 735 | local val = linda_:get(key_) |