1.2.11 • Published 7 years ago

swint-fork v1.2.11

Weekly downloads
118
License
MIT
Repository
github
Last release
7 years ago

swint-fork

Greenkeeper badge Process behaviour(fork, common/separate execution of code chunk, etc.) manager for Swint

Warning: This is not the final draft yet, so do not use this until its official version is launched

Installation

$ npm install --save swint-fork

Options

  • preProcess: Function
    • fork: swint-fork instance
    • cb: callback when preProcess ended
  • postProcess: Function
    • fork: swint-fork instance
    • cb: callback when postProcess ended
  • onExit: Function, executed when child process died
  • numFork: Number, default: # of CPU logical core
  • operator: swint-proc-ops instance, default: null

Usage

var fork = swintFork({
		preProcess: function(fork, cb) {
			cb({
				foo: 'bar'
			});
		},
		postProcess: function(fork, sharedData, cb) {
			print(sharedData.foo);

			cb({});
		},
		onExit: function(fork) {
			print('process killed');
		},
		operator: swintProcOps({
			server: {
				enabled: true
			},
			keyBind: {
				enabled: true
			}
		})
	});
1.2.11

7 years ago

1.2.10

8 years ago

1.2.9

8 years ago

1.2.8

9 years ago

1.2.7

9 years ago

1.2.6

9 years ago

1.2.5

9 years ago

1.2.4

9 years ago

1.2.3

9 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.0

10 years ago