Skip to content
  • Damien George's avatar
    stmhal: Initial implementation of multithreading, currently disabled. · 882ec01e
    Damien George authored
    This patch brings the _thread module to stmhal/pyboard.  There is a very
    simple round-robin thread scheduler, which is disabled if there is only
    one thread (for efficiency when threading is not used).
    
    The scheduler currently switches threads at a rate of 250Hz using the
    systick timer and the pend-SV interrupt.
    
    The GIL is disabled so one must be careful to use lock objects to prevent
    concurrent access of objects.
    
    The threading is disabled by default, one can enabled it with the config
    option MICROPY_PY_THREAD to test it out.
    882ec01e