Skip to content

Test suite: get rid of argc in the _task_queue#9684

Merged
Frenzie merged 1 commit into
masterfrom
unknown repository
Oct 25, 2022
Merged

Test suite: get rid of argc in the _task_queue#9684
Frenzie merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Oct 25, 2022

Copy link
Copy Markdown

argc was eliminated in #9624

Thanks to @hasezoey (#9680 (comment))

Plus a minor change in the scheduling test, so that the _task_queue is not filled only from one end.


This change is Reviewable

@hasezoey

Copy link
Copy Markdown
Contributor

i think you meant @hius07 for #9680 (comment)

table.insert(
UIManager._task_queue,
{ time = now + i, action = noop, argc = 0, args = {} }
{ time = now + i, action = noop, args = {} }

@NiLuJe NiLuJe Oct 25, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harmless here because the table is empty, but, FWIW, if you do need to set args, the arg count is folded in the table, and it needs to happen at table construction, and in this order:

{n = 4, 1, nil, nil, 4}

(Leaving this here for future archeologists, c.f., koreader/koreader-base#1535 (comment) ;)).

@Frenzie Frenzie added this to the 2022.11 milestone Oct 25, 2022
@Frenzie Frenzie merged commit db8e2a9 into koreader:master Oct 25, 2022
@ghost ghost deleted the testsuiteFixArgc branch October 25, 2022 20:40
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
argc was eliminated in koreader#9624

Thanks to @hius07  koreader#9680 (comment)

Plus a minor change in the scheduling test, so that the _task_queue is not filled only from one end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants