
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@effection/channel
Advanced tools
A multi producer, multi consumer unbounded channel for Effection. Channels are useful for communicating between different parts of a system, for building pubsub buses, or a whole lot of other synchronization needs.
Sending to a channel is synchronous and does not require the sender to be running in an effection context. However, reading from a channel can only be done through operations.
Because of the synchronous nature of sends, channels are unbounded in size, which means that they cannot handle backpressure. As such, channels should be used more as a synchronization mechanism, rather than a high-throughput system.
A basic example:
import { createChannel } from '@effection/channel';
import { main } from '@effection/main';
import { sleep } from '@effection/core';
main(function*() {
let channel = createChannel();
spawn(function*() {
while(true) {
yield sleep(1000);
channel.send({ message: "ping" });
}
});
let subscription = yield channel.subscribe();
while(true) {
let { value } = yield subscription.next();
console.log("value:", value);
}
});
FAQs
MPMC Channel implementation for effection
We found that @effection/channel demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.