Skip to content

cls.unique_task2name should hold lists #99

@dlashua

Description

@dlashua

example code:

def whatever(): task.unique('a') task.unique('b')

at line 170 of function.py, cls.unique_task2name[curr_task] will be equal to "b" after this is complete.

Therefore, when cleanup happens at line 301, only cls.unique_name2task['b'] is cleaned. 'a' still shows this task holding.

Any unique name can only hold one task. But a task should be able to hold multiple unique slots.

Alternately, the kill_me logic at line 151 could check to see if the task in the slot is "finished" and ignore it if it is.

I use multiple task.unique statements in the same function because I have two functions that run against one another with delays... an on/off scenario. If the thing is ON, then it uses task.unique to kill any pending off task, and then uses it again to set its own pending on task. The off function similarly kills any pending on task before setting its own pending off task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions