Throw error when sending to terminated process

Mirrors behavior of start method
This commit is contained in:
Kevin Sawicki
2014-01-11 17:23:51 -08:00
parent 82d5577bdc
commit 3c32a8e8fb

View File

@@ -91,6 +91,7 @@ class Task
# * message:
# The message to send
send: (message) ->
throw new Error("Cannot send message to terminated process") unless @childProcess?
@childProcess.send(message)
# Public: Forcefully stop the running task.