- Electron version: 1.1.0
- Operating system: Windows
- Use case: cleanup and reporting tasks executed on quit (headless), which may take time and should not prevent from opening a new instance.
- Proposed solutions:
  - new _app.releaseSingleInstance()_ API which free the singleInstance lock
  - replace _app.releaseSingleInstance()_ API by an event listener (which may be listened/unlistened)
  - [app.makeSingleInstance](https://github.com/electron/electron/blob/master/docs/api/app.md#appmakesingleinstancecallback) returns the result of the callback function. So we can choose to quit or not in a more accurate way.
  - Provide a communication channel between the new instance and the main one (in callback arguments)

atom/browser/api/atom_api_app.cc
const base::DictionaryValue& options,
    const net::CompletionCallback& callback) {
  auto browser_context = AtomBrowserMainParts::Get()->browser_context();
  if (!certificate_manager_model_) {
    std::unique_ptr<base::DictionaryValue> copy = options.CreateDeepCopy();
    CertificateManagerModel::Create(browser_context,
        base::Bind(&App::OnCertificateManagerModelCreated,
                   base::Unretained(this),
                   base::Passed(&copy),
                   callback));
    return;
  }
  int rv = ImportIntoCertStore(certificate_manager_model_.get(), options);
  callback.Run(rv);
}
void App::OnCertificateManagerModelCreated(
    std::unique_ptr<base::DictionaryValue> options,
    const net::CompletionCallback& callback,
    std::unique_ptr<CertificateManagerModel> model) {
  certificate_manager_model_ = std::move(model);
  int rv = ImportIntoCertStore(certificate_manager_model_.get(),
                               *(options.get()));
  callback.Run(rv);
}
#endif
mate::Handle<App> App::Create(v8::Isolate* isolate) {