mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use a single worker for status refreshes
There still appear to be crashes occurring when using libgit2 from multiple workers at the same time. So only start a new status worker once the current one completes if a refresh was requested while a worker was running. Closes #367
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
_ = require 'underscore'
|
||||
EventEmitter = require 'event-emitter'
|
||||
|
||||
module.exports =
|
||||
class Task
|
||||
aborted: false
|
||||
@@ -49,3 +52,6 @@ class Task
|
||||
@abort()
|
||||
@worker?.terminate()
|
||||
@worker = null
|
||||
@trigger 'task-completed'
|
||||
|
||||
_.extend Task.prototype, EventEmitter
|
||||
|
||||
Reference in New Issue
Block a user