Skip to content

threading problem #6381

@kdschlosser

Description

@kdschlosser

I am using an ESP32 and MicroPython 1.12 and I have a question that may be a bug.

How does one go about stalling a thread without spinning wheels?? When using any other flavor of Python if a thread spins it's wheels it will chew up 100% of the processor. (on a multicore processor it will chew up a single core).

I have not tested any code on the ESP as of yet, I thought I would ask before I make an error and have to change a bunch of code around. I normally use threading,Event so I have the option of stalling a thread until an event occurs or for a specified amount of time. I do not think that the threading module exists in MicrooPython.

I specifically need an event based stall. I would think that utime.sleep_ms would apply to a thread nd not globally. I could be wrong tho.

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