How to Install and Uninstall python312-unsync Package on openSuSE Tumbleweed

Last updated: November 23,2024

1. Install "python312-unsync" package

Here is a brief guide to show you how to install python312-unsync on openSuSE Tumbleweed

$ sudo zypper refresh $ sudo zypper install python312-unsync

2. Uninstall "python312-unsync" package

Please follow the steps below to uninstall python312-unsync on openSuSE Tumbleweed:

$ sudo zypper remove python312-unsync

3. Information about the python312-unsync package on openSuSE Tumbleweed

Information for package python312-unsync:
-----------------------------------------
Repository : openSUSE-Tumbleweed-Oss
Name : python312-unsync
Version : 1.3-1.18
Arch : noarch
Vendor : openSUSE
Installed Size : 27.6 KiB
Installed : No
Status : not installed
Source package : python-unsync-1.3-1.18.src
Upstream URL : https://github.com/alex-sherman/unsync
Summary : Unsynchronize asyncio
Description :
Unsynchronize `asyncio` by using an ambient event loop in a separate thread.
1. Mark all async functions with `@unsync`. May also mark regular
functions to execute in a separate thread.
* All `@unsync` functions, async or not, return an `Unfuture`
2. All `Futures` must be `Unfutures` which includes the result of an
`@unsync` function call, or wrapping `Unfuture(asyncio.Future)` or
`Unfuture(concurrent.Future)`. `Unfuture` combines the behavior of
`asyncio.Future` and `concurrent.Future`:
* `Unfuture.set_value` is threadsafe unlike `asyncio.Future`
* `Unfuture` instances can be awaited, even if made from
`concurrent.Future`
* `Unfuture.result()` is a blocking operation *except* in
`unsync.loop`/`unsync.thread` where it behaves like
`asyncio.Future.result` and will throw an exception if the future
is not done
3. Functions will execute in different contexts:
* `@unsync` async functions will execute in an event loop in
`unsync.thread`
* `@unsync` regular functions will execute in
`unsync.thread_executor`, a `ThreadPoolExecutor`
* `@unsync(cpu_bound=True)` regular functions will execute in
`unsync.process_executor`, a `ProcessPoolExecutor`