1.2.11 • Published 5 years ago

swint-fork v1.2.11

Weekly downloads
118
License
MIT
Repository
github
Last release
5 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

5 years ago

1.2.10

6 years ago

1.2.9

7 years ago

1.2.8

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.1.0

9 years ago