Hello All,
I'm new to the forum. I have two questions:
(1)
I tried going through the earlier posts regarding this, but last relevant post is from Aug, 2014. I want to know that is it possible to implement multithreading/ multiprocessing to micropython. I posts from 2014 it was written that it will take a long time. It's been long time since then, is it now possible?
(2)
There are some other libraries like sklearn and Pybrain I want to import. Is it possible? If yes, how?
Thanks.
Multithreading/ Multiprocessing & other libraries
-
- Posts: 1
- Joined: Tue Oct 04, 2016 2:32 pm
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Multithreading/ Multiprocessing & other libraries
The official method of cooperative multi-tasking is uasyncio. There is support for pre-emptive multi threading in the form of the _thread library but I think this is currently implemented only on the WiPy. uasyncio is the way to proceed for web applications and suchlike where fast response is not mandatory; its timing granularity is currently constrained to one second. Applications requiring faster task switching can use this library https://github.com/peterhinch/Micropython-scheduler.git which implements cooperative multi-threading using Python generators.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Multithreading/ Multiprocessing & other libraries
Information in the previous message isn't fully correct. Please proceed to the official announcement of multithreading support for complete information on the matter: http://forum.micropython.org/viewtopic.php?f=8&t=1864
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/