<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openmano-mpy/tests/thread, branch master</title>
<subtitle>MicroPython source and hardware configuration for OpenMano</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/'/>
<entry>
<title>tests/thread/stress_schedule.py: Assign globals before running test.</title>
<updated>2020-10-27T13:54:30+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2020-10-27T13:54:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=368c1a09611f2a139c0e401eeb4359f9cc2a7c57'/>
<id>368c1a09611f2a139c0e401eeb4359f9cc2a7c57</id>
<content type='text'>
When threading is enabled without the GIL then there can be races between
the threads accessing the globals dict.  Avoid this issue by making sure
all globals variables are allocated before starting the threads.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When threading is enabled without the GIL then there can be races between
the threads accessing the globals dict.  Avoid this issue by making sure
all globals variables are allocated before starting the threads.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: Rename "sys" module to "usys".</title>
<updated>2020-09-03T14:10:24+00:00</updated>
<author>
<name>stijn</name>
</author>
<published>2020-06-18T09:19:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=40ad8f1666b265dafc7844d765f45cfae4b6299f'/>
<id>40ad8f1666b265dafc7844d765f45cfae4b6299f</id>
<content type='text'>
This is consistent with the other 'micro' modules and allows implementing
additional features in Python via e.g. micropython-lib's sys.

Note this is a breaking change (not backwards compatible) for ports which
do not enable weak links, as "import sys" must now be replaced with
"import usys".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is consistent with the other 'micro' modules and allows implementing
additional features in Python via e.g. micropython-lib's sys.

Note this is a breaking change (not backwards compatible) for ports which
do not enable weak links, as "import sys" must now be replaced with
"import usys".
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/thread/thread_stacksize1.py: Increase stack size for CPython.</title>
<updated>2020-05-04T14:43:24+00:00</updated>
<author>
<name>yangfl</name>
</author>
<published>2020-05-01T10:28:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=138a28dc07fdbe633c225e05bee064a6eb41b532'/>
<id>138a28dc07fdbe633c225e05bee064a6eb41b532</id>
<content type='text'>
On arm64 with CPython:

  &gt;&gt;&gt; _thread.stack_size(32*1024)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ValueError: size not valid: 32768 bytes

So increase the CPython value in the test to 512k so it runs on more
systems (on modern Linux the default stack size is usually 8MB).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On arm64 with CPython:

  &gt;&gt;&gt; _thread.stack_size(32*1024)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ValueError: size not valid: 32768 bytes

So increase the CPython value in the test to 512k so it runs on more
systems (on modern Linux the default stack size is usually 8MB).
</pre>
</div>
</content>
</entry>
<entry>
<title>py/scheduler: Add assert that scheduler is locked when unlocking.</title>
<updated>2020-04-13T11:55:47+00:00</updated>
<author>
<name>Jim Mussared</name>
</author>
<published>2020-04-03T02:16:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=8470cd0be90de03ba38103db69d134c8915bc114'/>
<id>8470cd0be90de03ba38103db69d134c8915bc114</id>
<content type='text'>
And add a test that shows how this can happen when multiple threads are
accessing the scheduler, which fails if atomic sections are not used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And add a test that shows how this can happen when multiple threads are
accessing the scheduler, which fails if atomic sections are not used.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Format all Python code with black, except tests in basics subdir.</title>
<updated>2020-03-30T02:21:58+00:00</updated>
<author>
<name>David Lechner</name>
</author>
<published>2020-03-23T02:26:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=3dc324d3f1312e40d3a8ed87e7244966bb756f26'/>
<id>3dc324d3f1312e40d3a8ed87e7244966bb756f26</id>
<content type='text'>
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py.  The basics/ subdirectory is excluded for now so we
aren't changing too much at once.

In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py.  The basics/ subdirectory is excluded for now so we
aren't changing too much at once.

In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
</pre>
</div>
</content>
</entry>
<entry>
<title>py/modthread: Raise RuntimeError in release() if lock is not acquired.</title>
<updated>2017-06-14T04:43:50+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2017-06-14T04:43:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=e374cfff80c37b96b03d4438e475e405b03e6d61'/>
<id>e374cfff80c37b96b03d4438e475e405b03e6d61</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>various: Spelling fixes</title>
<updated>2017-05-29T08:36:05+00:00</updated>
<author>
<name>Ville Skyttä</name>
</author>
<published>2017-05-29T07:08:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=ca16c3821053e5bf2b87aeb10007f73f31dc1eac'/>
<id>ca16c3821053e5bf2b87aeb10007f73f31dc1eac</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/thread: Add stress-test for creating many threads.</title>
<updated>2017-02-15T00:12:37+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2017-02-04T12:35:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=06a12ada48c11a101eb138220cd0e0ca33a612be'/>
<id>06a12ada48c11a101eb138220cd0e0ca33a612be</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/thread: Replace busy waiting loops with a loop that sleeps.</title>
<updated>2017-02-15T00:12:37+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2017-02-04T12:33:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=2847d7431d9334220445e93dc7af707821e80d5e'/>
<id>2847d7431d9334220445e93dc7af707821e80d5e</id>
<content type='text'>
Depending on the thread scheduler, a busy-wait loop can hog the CPU and
make the tests very slow.  So convert such loops to loops that have an
explicit sleep, allowing the worker threads to do their job.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Depending on the thread scheduler, a busy-wait loop can hog the CPU and
make the tests very slow.  So convert such loops to loops that have an
explicit sleep, allowing the worker threads to do their job.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/thread: Fix stack size test so tests run reliably on baremetal.</title>
<updated>2017-02-01T06:21:35+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2017-02-01T06:21:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=28185bb81bc3340b5c84bfd8c974488c6ccb3dbd'/>
<id>28185bb81bc3340b5c84bfd8c974488c6ccb3dbd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
