[TriEmbed] OT: python and threading

Alex Davis alexd at matrixwide.com
Tue Nov 14 13:56:14 CST 2017


> On Nov 14, 2017, at 2:49 PM, Carl Nobile <carl.nobile at gmail.com> wrote:
> 
> Alex,
> 
> If you want Python threading to work with multiple processors it won't work because of the GIL (Global Interpreter Log) in Python. It is generally better to use processes than threading.
> 
> With that said both threading and processes are not very difficult in Python and if running on a Linux OS the speed will be about the same.
> 
> The python docs for both  are:
> https://docs.python.org/3.6/library/threading.html <https://docs.python.org/3.6/library/threading.html>
> https://docs.python.org/3.6/library/multiprocessing.html <https://docs.python.org/3.6/library/multiprocessing.html>
> 
> Both of these methods follow a similar paradigm.
> 
> The docs above have examples. In general, if you have Python question consult the docs they are very well written and complete.
> 
> At the top of the screen, you can flip to Python 2.7.x.
> 

Thanks! Looks like processes will work. I don’t see anything like a systick, so I’ll just poll in each process.


|\ |  (¯  \/ |¯\  |V| |\ ¯|¯ |¯) | \/ | | | |¯\ (¯   /¯  /\ |V|
|-||_ (_  /\ |_/ @| | |-| |  | \ | /\ |^| | |_/ (_ . \_  \/ | |







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20171114/5d1b7f2a/attachment-0001.html>


More information about the TriEmbed mailing list