Move db.exchange DB work off of the main thread.

This commit is contained in:
2024-06-16 10:16:39 -04:00
parent 63776d40bd
commit b6a937c954
2 changed files with 77 additions and 42 deletions

View File

@ -275,7 +275,11 @@ static void _test_database(const tf_test_options_t* options)
" if (await db.get('a') != 1) {\n"
" exit(2);\n"
" }\n"
" await db.set('b', 2);\n"
" await db.exchange('b', null, 1);\n"
" await db.exchange('b', 1, 2);\n"
" if (await db.get('b') != 2) {\n"
" exit(5);\n"
" }\n"
" await db.set('c', 3);\n"
"\n"
" var expected = ['a', 'b', 'c'];\n"