Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chattyproc

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chattyproc

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Chattyproc

TODO: Write a gem description

Installation

Add this line to your application's Gemfile:

gem 'chattyproc'

And then execute:

$ bundle

Or install it yourself as:

$ gem install chattyproc

Usage

Right now ChattyProc only includes a single process communication method - a pipe server. The idea behind the pipe server is that a process can communicate back and forth with processes that it forks. Here's a quick example:

require "chattyproc"
	
	# Set up the pipe server
	ps = ChattyProc::PipeServer.new
	
	# Fork a new process
	fork do
		# Mark this process as the callee
		ps.callee!
		
		message = ps.read
		ps.write("Hello #{message}")
	end
	
	# Mark this process as the caller
	ps.caller!
	
	# Send a message over to the other process
	ps.write("Alan")
	
	# Print the response
	response = ps.read
	
	# Wait for the child process to exit
	Process.waitall
	

This style of pipe server is in use in tconsole and has worked amazingly well. It's faster than DRb for communication between forked processes, and has shown itself to be less error prone.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 21 Jan 2013

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc