
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
A simple library for managing asynchrony; inspired by Microsoft's Task Class.
async_task provides an equally accessible syntax to the async
and await
keywords, but with simpler usage semantics, particularly when calling asynchronous code from within synchronous code.
Import the Async
class from async_tasks
and use as a wrapper for callable objects to execute them asynchronously, or
apply as a decorator to permanently transform a function or method into an Async object.
Invoke Async instances as any other callable. The return of the call will be an Async.Worker
instance. Workers have a wait
method and a result
property; when either of these are called, the caller will synchronize with the background worker,
blocking until completion or timeout.
e.g.:
from async_task import Async
@Async
def func():
return 0
worker = func()
worker.wait(1)
assert worker.result == 0
# it is not necessary to call wait() prior to accessing result, however, it is not possible to provide a timeout with
# result.
from async_task import Async
def func():
return 0
async_obj = Async(func)
worker = async_obj()
assert func() == worker.result
from async_task import Async
class Cls:
def __init__(self, attr):
self.attr = attr
@Async
def func(self):
return self.attr
assert Cls(0).func().result == 0
FAQs
A simple library for managing asynchrony.
We found that simple-async-task demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.