diff options
author | Benoit Germain <bnt.germain@gmail.com> | 2018-11-05 10:33:20 +0100 |
---|---|---|
committer | Benoit Germain <bnt.germain@gmail.com> | 2018-11-05 10:33:20 +0100 |
commit | ef8fc2c4a215110b034424f9c423111d34963f31 (patch) | |
tree | ee14122968fd8f076bf749be7f647530372d4d85 /deep_test/deeptest.lua | |
parent | 2354e878496d03b390e7cb8fbcd4d473ff983333 (diff) | |
download | lanes-ef8fc2c4a215110b034424f9c423111d34963f31.tar.gz lanes-ef8fc2c4a215110b034424f9c423111d34963f31.tar.bz2 lanes-ef8fc2c4a215110b034424f9c423111d34963f31.zip |
rename deep_test.lua
Diffstat (limited to 'deep_test/deeptest.lua')
-rw-r--r-- | deep_test/deeptest.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/deep_test/deeptest.lua b/deep_test/deeptest.lua new file mode 100644 index 0000000..3b514dd --- /dev/null +++ b/deep_test/deeptest.lua | |||
@@ -0,0 +1,22 @@ | |||
1 | -- create a deep-aware full userdata while Lanes isn't loaded | ||
2 | local dt = require "deep_test" | ||
3 | local deep = dt.new_deep() | ||
4 | deep:set(666) | ||
5 | print( deep) | ||
6 | |||
7 | local clonable = dt.new_clonable() | ||
8 | |||
9 | -- now load Lanes and see if that userdata is transferable | ||
10 | --[[ | ||
11 | local lanes = require("lanes").configure() | ||
12 | local l = lanes.linda "my linda" | ||
13 | |||
14 | l:set( "key", deep) | ||
15 | local deep_out = l:get( "key") | ||
16 | print( deep_out) | ||
17 | |||
18 | lanes.register() | ||
19 | l:set( "key", clonable) | ||
20 | local clonable_out = l:get( "key") | ||
21 | print( clonable_out) | ||
22 | --]] \ No newline at end of file | ||