lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




Marcus Mason <m4gicks@gmail.com>于2021年9月24日 周五09:20写道:
Hi list, recently I discovered that it is not possible to yield from
within a table.sort sorting function. Is this intentional behaviour?
There doesn't seem to be a note in the manual saying this isn't
possible. You /can/ yield from c callbacks in places like xpcall.

A yieldable sort implementation is not a good idea, because you can easier modify the table when it is sorting.

--
http://blog.codingnow.com