mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Rename Task.terminate to Task.abort
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module.exports =
|
||||
class Task
|
||||
terminated: false
|
||||
aborted: false
|
||||
|
||||
constructor: (@path) ->
|
||||
|
||||
@@ -9,7 +9,7 @@ class Task
|
||||
|
||||
@worker = new Worker(require.getPath('task-shell'))
|
||||
@worker.onmessage = ({data}) =>
|
||||
if @terminated
|
||||
if @aborted
|
||||
@done()
|
||||
return
|
||||
|
||||
@@ -42,10 +42,10 @@ class Task
|
||||
postMessage: (data) ->
|
||||
@worker.postMessage(data)
|
||||
|
||||
terminate: ->
|
||||
@terminated = true
|
||||
abort: ->
|
||||
@aborted = true
|
||||
|
||||
done: ->
|
||||
@terminate()
|
||||
@abort()
|
||||
@worker?.terminate()
|
||||
@worker = null
|
||||
|
||||
Reference in New Issue
Block a user