Skip to content

Commit 2a58e45

Browse files
committed
Fix up v0.12.0 release notes to mention BlockingTrioPortal changes
Thanks to jtrakk for the catch.
1 parent da5f90c commit 2a58e45

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

docs/source/history.rst

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ Features
2121
`~trio.abc.ReceiveStream.receive_some`; you can ``await
2222
stream.receive_some()`` with no arguments, and the stream will
2323
automatically pick a reasonable size for you. (`#959 <https://github.com/python-trio/trio/issues/959>`__)
24+
- Threading interfaces have been reworked:
25+
``run_sync_in_worker_thread`` is now `trio.to_thread.run_sync`, and
26+
instead of ``BlockingTrioPortal``, use `trio.from_thread.run` and
27+
`trio.from_thread.run_sync`. What's neat about this is that these
28+
cooperate, so if you're in a thread created by `to_thread.run_sync`,
29+
it remembers which Trio created it, and you can call
30+
``trio.from_thread.*`` directly without having to pass around a
31+
``BlockingTrioPortal`` object everywhere. (`#810 <https://github.com/python-trio/trio/issues/810>`__)
2432
- We cleaned up the distinction between the "abstract channel interface"
2533
and the "memory channel" concrete implementation.
2634
`trio.abc.SendChannel` and `trio.abc.ReceiveChannel` have been slimmed
@@ -86,11 +94,15 @@ Deprecations and Removals
8694
~~~~~~~~~~~~~~~~~~~~~~~~~
8795

8896
- The ``clear`` method on `trio.Event` has been deprecated. (`#637 <https://github.com/python-trio/trio/issues/637>`__)
89-
- ``run_sync_in_worker_thread`` has become `trio.to_thread.run_sync`, in
90-
order to make it shorter, and more consistent with the new
91-
``trio.from_thread``. And ``current_default_worker_thread_limiter`` is
92-
now `trio.to_thread.current_default_thread_limiter`. (Of course the
93-
old names still work with a deprecation warning, for now.) (`#810 <https://github.com/python-trio/trio/issues/810>`__)
97+
- ``BlockingTrioPortal`` has been deprecated in favor of the new
98+
`trio.from_thread`. (`#810
99+
<https://github.com/python-trio/trio/issues/810>`__)
100+
- ``run_sync_in_worker_thread`` is deprecated in favor of
101+
`trio.to_thread.run_sync`. (`#810
102+
<https://github.com/python-trio/trio/issues/810>`__)
103+
- ``current_default_worker_thread_limiter`` is deprecated in favor of
104+
`trio.to_thread.current_default_thread_limiter`. (`#810
105+
<https://github.com/python-trio/trio/issues/810>`__)
94106
- Give up on trying to have different low-level waiting APIs on Unix and
95107
Windows. All platforms now have `trio.hazmat.wait_readable`,
96108
`trio.hazmat.wait_writable`, and `trio.hazmat.notify_closing`. The old

0 commit comments

Comments
 (0)