3
我有一些像這樣的代碼:二郎ETS有袋類元素排序
Table = ets:new(table, [bag]),
true = ets:insert(Table, {bucket_1, some_value_1}),
true = ets:insert(Table, {bucket_1, some_value_2}),
true = ets:insert(Table, {bucket_1, some_value_3}),
LookupResult = ets:lookup(Table, bucket_1),
?_assertEqual(
[{bucket_1, some_value_1}, {bucket_1, some_value_2}, {bucket_1, some_value_3}],
LookupResult
).
是內鬥元素的ETS保證排序?我是否應該期望,因爲元素已被添加到表格中,ETS保存了元素的順序?
是的,我在5秒前發現了這個詞。謝謝=) –