
Security News
pnpm 10.16 Adds New Setting for Delayed Dependency Updates
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Actor model for Python.
This README is auto-generated, see project wiki for details.
class ActorHandle(Parabject)
def __getattr__(name)
Return a function to add a message to the mailbox, for execution by a capable worker when one becomes free.
def __getitem__(key)
Index or slice workers by the given key and return an actor handle backed by the resulting workers.
def __iter__()
For each worker, yield an actor handle backed by that worker specifically.
class Spawn()
def __init__(executor)
Spawned actors will use threads from the given executor.
def __call__(*objs)
Create an actor backed by the given worker object(s), each of which is used in a single-threaded way.
Calling a method on the returned actor returns a Future
immediately, which eventually becomes done with the result of a worker method of the same name (or never if the worker method hangs).
A worker method may be async, in which case it can await futures returned by other actors, releasing the worker in the meantime.
class Join()
Make multiple futures awaitable as a unit. In the zero futures case this resolves (to an empty list) without suspending execution. Otherwise if any future hangs, so does this. Otherwise if any future failed, all such exceptions are raised as a chain. Otherwise all results are returned as a list.
class ManualExecutor()
Utilise the main (or any other) thread directly.
def run()
Execute tasks until interrupted. Typical usage is for the main thread to call this after setting up the system.
def putinterrupt()
Cause exactly one thread to exit the run
method soon.
class Future()
def wait()
Block until there is an outcome, then return/raise it.
For use outside actors, or within one if you know the future is done and don't want to suspend execution with await
in that case.
def andforget(log)
Send any exception to the given log.
class Sleeper()
def interrupt()
If a sleep is in progress that sleep returns now, otherwise the next sleep will return immediately. This is similar behaviour to interrupting a maybe-sleeping thread in Java.
FAQs
Actor model for Python
We found that splut 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
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.