
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
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
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.