[TriEmbed] OT: python and threading

Carl Nobile carl.nobile at gmail.com
Tue Nov 14 15:31:02 CST 2017


Alex,

Just realized what you mean by systick. This may help.

https://stackoverflow.com/questions/156330/get-timer-ticks-in-python

Carl


On Tue, Nov 14, 2017 at 2:56 PM, Alex Davis <alexd at matrixwide.com> wrote:

>
> 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/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|
> |-||_ (_  /\ |_/ @| | |-| |  | \ | /\ |^| | |_/ (_ . \_  \/ | |
>
>
>
>
>
>
>
>


-- 
-------------------------------------------------------------------------------
Carl J. Nobile (Software Engineer)
carl.nobile at gmail.com
-------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20171114/83798b66/attachment.html>


More information about the TriEmbed mailing list