maix.thread
maix.thread module
You can use
maix.threadto access this module with MaixPy
This module is generated from MaixPy and MaixCDK
Module
No module
Enum
Variable
Function
Class
Thread
thread class
C++ defination code:
class Thread
__init__
def __init__(self, func: typing.Callable[[capsule], None], args: capsule = None) -> None
create thread
| item | description |
|---|---|
| type | func |
| param | func: direction [in], thread function, one args parameter, void* type, no return valueargs: direction [in], thread function parameter |
| static | False |
C++ defination code:
Thread(std::function<void(void *)> func, void *args = nullptr)
join
def join(self) -> None
wait thread exit
| item | description |
|---|---|
| type | func |
| static | False |
C++ defination code:
void join()
detach
def detach(self) -> None
detach thread, detach will auto start thread and you can't use join anymore.
| item | description |
|---|---|
| type | func |
| static | False |
C++ defination code:
void detach()
joinable
def joinable(self) -> bool
Check if thread is joinable
| item | description |
|---|---|
| type | func |
| return | true if thread is joinable |
| static | False |
C++ defination code:
bool joinable()