- 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
#include "atom/common/native_mate_converters/net_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/node_includes.h"
#include "atom/common/options_switches.h"
#include "base/command_line.h"
#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "brightray/browser/brightray_paths.h"
#include "chrome/common/chrome_paths.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/common/content_switches.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
#if defined(OS_WIN)
#include "base/strings/utf_string_conversions.h"
#endif
using atom::Browser;
namespace mate {
#if defined(OS_WIN)
template<>
struct Converter<Browser::UserTask> {
  static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,