Comments (1)
问题已经解决。
原策略:
使用QSharedMemory作为检测机制。
如果检测到不存在命名为 org.kreogist.mu 的共享内存,那么建立一块大小为1的共享内存,然后建立一个同名的本地服务器。等待传入链接。
如果检测到之前存在一个命名为 org.kreogist.mu 的共享内存,那么直接参数发送到同名的本地服务器,然后退出。
修复后的策略:
当检测不到同名内存的时候,与之前的策略完全一致。
如果检测到之前存在一个命名为 org.kreogist.mu 的共享内存,那么直接将参数发送到同名的本地服务器。检测发送结果,如果发送成功,直接退出。(此时说明存在另一个正常运行的实例)如果发送超时,那么建立本地服务器,以此作为新的实例。(此时说明之前的实例非正常退出)
Original policy:
Use QSharedMemory as the detect policy.
If the instance can't detect the shared memory named 'org.kreogist.mu', then set up a 1-size shared memory. Then create a local server with the same name as the shared memory and wait for socket connection.
If the instance detects the shared memory, then send all parameters to the local server. Then quit.
Fixed policy:
The same as original policy when it cannot detect the shared memory.
If the instance detects the shared memory, send parameters to the local server. Check the result, if parameters are sent success, then exit. (There's a running instance) If the operation times out, then set up the local server, it could be the singleton instance. (There wass a crashed instance before, it left the shared memory.)
from mu.
Related Issues (20)
- 更多歌词源 HOT 19
- Musixmatch 歌词源 HOT 5
- Translation file location(翻译文件位置) HOT 13
- 在Ubuntu 16.4下運行。。會導致其他應用變卡 HOT 13
- Windows 10 无法登陆 Kreogist 账户/Windows 10 cannot log in to Kreogist Account HOT 3
- 下载歌词将会继续播放/The music will resume playing when downloading music HOT 1
- 在 Backbox 上无法设置头像 / Cannot set avatar on Backbox HOT 3
- 同时添加 .cue 和对应音频文件的时候,忽略 .cue 对应的那个源文件 HOT 2
- 希望添加媒体库和智能播放列表功能 HOT 7
- 前来问候 HOT 1
- 批量下载歌词 / Batch lyrics download
- Would reset system volume when switching songs on Linux HOT 3
- Ubuntu 16.04 下高CPU占用 / High CPU usage on Ubuntu 16.04 HOT 1
- Translation .qm files not built by default HOT 3
- 更现代的GUI HOT 3
- Crash on macOS HOT 10
- PPA需更新 HOT 2
- Opus HOT 2
- win10系统mu无法使用
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mu.