From 86699e347ceaf52d08460855029cf182ed4af9e3 Mon Sep 17 00:00:00 2001 From: David Kebler Date: Mon, 15 May 2017 11:01:29 -0700 Subject: [PATCH] add documentation --- lib/interrupt.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/interrupt.js b/lib/interrupt.js index 50fd645..aa6f82e 100644 --- a/lib/interrupt.js +++ b/lib/interrupt.js @@ -53,6 +53,7 @@ class Interrupt extends EventEmitter { } + // manual firing for testing fire(name = 'fired') { this.emit(name, this.hook) } @@ -85,6 +86,11 @@ class Interrupt extends EventEmitter { } start() { + this.inter(port).on('fired', () => { + console.log(`interrupt port ${port} hook me \n ${relays}`) + // hook.bind(this)(port) + + }) return this.clear().then(() => this.poller.add(this.valuefd, Epoll.EPOLLPRI | Epoll.EPOLLONESHOT)); }